]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP1170861 Remove unused lineitem alert field
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </retrieve>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="vibtg" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
246             oils_persist:tablename="vandelay.import_bib_trash_group" 
247             reporter:label="Import/Overlay Field Groups for Removal">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
252                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
253                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
254                 </fields>
255                 <links>
256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
257                 </links>
258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
259                         <actions>
260                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
264                         </actions>
265                 </permacrud>
266         </class>
267
268
269         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
270                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
271                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
272                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
273                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
274                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
275                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
276                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
277                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
278                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
279                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
280                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
281                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
282                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
283                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
284                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
286                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
287                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
288                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
289                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
290                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
291                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
292                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
293                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
294                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
295                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
296                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
297                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
298                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                 </fields>
351                 <links>
352                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
359                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
366                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
367                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
369                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
370                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
371                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
372                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
373                 </fields>
374                 <links>
375                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
376                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
377                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </fields>
606                 <links>
607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
613                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                         </actions>
617                 </permacrud>
618         </class>
619
620         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
621                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
622                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
623                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
625                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
626                 </fields>
627                 <links>
628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
629                 </links>
630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
631                         <actions>
632                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
633                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                         </actions>
637                 </permacrud>
638         </class>
639
640         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
641                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
642                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
643                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
644                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
645                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
646                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
647                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
648                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
649             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
650                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
651                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
652                 </fields>
653                 <links>
654                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
655                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
656                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
657                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
658                 </links>
659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
660                         <actions>
661                                 <create permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </create>
664                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </retrieve>
667                                 <update permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </update>
670                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </delete>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
679                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
681                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
682                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
683                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
684                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
685                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
686                 </fields>
687                 <links>
688                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="ADMIN_IMPORT_MATCH_SET">
693                     <context link="match_set" field="owner"/>
694                                 </create>
695                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </retrieve>
698                                 <update permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </update>
701                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </delete>
704                         </actions>
705                 </permacrud>
706         </class>
707
708         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
710                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
711                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
712                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
714                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
715                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
716                 </fields>
717                 <links>
718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
720                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
721                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
722                 </links>
723         </class>
724
725     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
726         <fields oils_persist:primary="name">
727             <field reporter:label="Name" name="name" reporter:datatype="text"/>
728             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
729             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
730             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
731         </fields>
732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733             <actions>
734                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
735                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
736                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738             </actions>
739         </permacrud>
740     </class>
741
742     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
743         <fields oils_persist:primary="id">
744             <field reporter:label="ID" name="id" reporter:datatype="id"/>
745             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
746             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
747             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
748             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
749         </fields>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756             </actions>
757         </permacrud>
758     </class>
759
760         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
761                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
763                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
764                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
765                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
766                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
767                 </fields>
768                 <links>
769                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
770                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
771                 </links>
772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
773             <actions>
774                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
775                 <retrieve/>
776                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778             </actions>
779         </permacrud>
780         </class>
781
782         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
783                 <fields oils_persist:primary="name">
784                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
785                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
786                         <field reporter:label="Description" name="description" reporter:datatype="text" />
787                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
788                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
789                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
790                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
791                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
792                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
793                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
794                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
795                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
796                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
797                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
798                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
799                 </fields>
800                 <links>
801                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
802                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
803                 </links>
804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
805             <actions>
806                 <create permission="ADMIN_SVF" global_required="true"/>
807                 <retrieve/>
808                 <update permission="ADMIN_SVF" global_required="true"/>
809                 <delete permission="ADMIN_SVF" global_required="true"/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
818                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
819             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
820                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
821                 </fields>
822                 <links/>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
826                 <retrieve/>
827                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
829             </actions>
830         </permacrud>
831         </class>
832
833         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
834                 <fields oils_persist:primary="id">
835                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
836                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
837                 </fields>
838                 <links>
839                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
840                 </links>
841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
842             <actions>
843                 <retrieve/>
844             </actions>
845         </permacrud>
846         </class>
847
848         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
849                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
851                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
852                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
853                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
854                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
855                 </fields>
856                 <links>
857                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
858                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
859                 </links>
860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
861             <actions>
862                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
863                 <retrieve/>
864                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
866             </actions>
867         </permacrud>
868         </class>
869
870         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
871                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
872                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
873                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
874                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
875                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
876                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
877                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
878                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
879             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
880                 </fields>
881                 <links>
882                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
883                 </links>
884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
885             <actions>
886                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
887                 <retrieve/>
888                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
890             </actions>
891         </permacrud>
892         </class>
893
894         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
895                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
896                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
897                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
898                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
899                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
900                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
901                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
902                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
903                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
904                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
905                 </fields>
906                 <links>
907                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
908                 </links>
909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
910             <actions>
911                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
912                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
913                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915             </actions>
916         </permacrud>
917         </class>
918
919     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
920         <fields oils_persist:primary="name">
921             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
922             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
923             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
924             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
925             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
926             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
927             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
928             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
929             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
930             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
931         </fields>
932         <links>
933             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
934             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
935         </links>
936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937             <actions>
938                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
939                 <retrieve/>
940                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
942             </actions>
943         </permacrud>
944     </class>
945
946     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
947         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
948             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
949             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
950             <field reporter:label="Name" name="name" reporter:datatype="text"/>
951             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
952             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
953             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
954             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
955         </fields>
956         <links>
957             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
962                 <retrieve/>
963                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
965             </actions>
966         </permacrud>
967     </class>
968
969         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
970                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
971                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
972                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
973                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
974                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
975                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
976                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
977                 </fields>
978                 <links>
979             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
980             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
981                 </links>
982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
983                         <actions>
984                                 <retrieve/>
985                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
986                         </actions>
987                 </permacrud>
988         </class>
989
990         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
991                 <fields oils_persist:primary="key">
992                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
993                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
994                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
995                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
996                 </fields>
997                 <links/>
998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
999                         <actions>
1000                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1001                                 <retrieve/>
1002                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1003                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1004                         </actions>
1005                 </permacrud>
1006         </class>
1007
1008         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1009                 <fields oils_persist:primary="module">
1010                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1011                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1012                 </fields>
1013                 <links/>
1014         </class>
1015
1016         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1017                 <fields oils_persist:primary="module">
1018                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1019                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1020                 </fields>
1021                 <links/>
1022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1023                         <actions>
1024                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1025                                 <retrieve/>
1026                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1027                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1028                         </actions>
1029                 </permacrud>
1030         </class>
1031
1032         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1033                 <fields oils_persist:primary="module">
1034                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1035                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1036                 </fields>
1037                 <links/>
1038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1039                         <actions>
1040                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1041                                 <retrieve/>
1042                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1043                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1044                         </actions>
1045                 </permacrud>
1046         </class>
1047
1048         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1049                 <fields oils_persist:primary="module">
1050                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1051                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1052                 </fields>
1053                 <links/>
1054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1055                         <actions>
1056                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1057                                 <retrieve/>
1058                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1059                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1060                         </actions>
1061                 </permacrud>
1062         </class>
1063
1064         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1065                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1066                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1067                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1068                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1069                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1070                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1071                 </fields>
1072                 <links>
1073                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1074                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1075                 </links>
1076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1077                         <actions>
1078                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1079                     <context link="event_def" field="owner"/>
1080                 </create>
1081                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1082                     <context link="event_def" field="owner"/>
1083                 </retrieve>
1084                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1085                     <context link="event_def" field="owner"/>
1086                 </update>
1087                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1088                     <context link="event_def" field="owner"/>
1089                 </delete>
1090                         </actions>
1091                 </permacrud>
1092         </class>
1093
1094         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1095                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1096                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1097                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1098                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1099                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1100                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1101                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1102                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1103                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1104                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1105                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1106                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1107                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1108                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1109                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1110                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1111                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1112                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1113                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1114                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1115                 </fields>
1116                 <links>
1117                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1118                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1119                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1120                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1121                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1122                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1123                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1124                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1125                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1126                 </links>
1127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1128                         <actions>
1129                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1130                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1131                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1132                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1133                         </actions>
1134                 </permacrud>
1135         </class>
1136
1137         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1138                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1139                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1140                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1141                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1142                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1143                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1144                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1145                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1146                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1147                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1148                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1149                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1150                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1151                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1152                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1153                 </fields>
1154                 <links>
1155                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1156                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1157                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1158                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1159                 </links>
1160         </class>
1161
1162         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1163                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1164                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1165                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1166                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1167                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1168                 </fields>
1169                 <links>
1170                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1171                 </links>
1172                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1173                         <actions>
1174                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1175                     <context link="event_def" field="owner"/>
1176                 </create>
1177                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1178                     <context link="event_def" field="owner"/>
1179                 </retrieve>
1180                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1181                     <context link="event_def" field="owner"/>
1182                 </update>
1183                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1184                     <context link="event_def" field="owner"/>
1185                 </delete>
1186                         </actions>
1187                 </permacrud>
1188         </class>
1189
1190         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1191                 <oils_persist:source_definition><![CDATA[
1192                 SELECT  atevdef.hook,
1193                         atevdef.name,
1194                         atevdef.reactor,
1195                         atev.id,
1196                         atev.event_def,
1197                         atev.add_time,
1198                         atev.run_time,
1199                         atev.start_time,
1200                         atev.update_time,
1201                         atev.complete_time,
1202                         atev.update_process,
1203                         atev.state,
1204                         atev.user_data,
1205                         atev.template_output,
1206                         atev.error_output,
1207                         atev.async_output,
1208                         targ_circ.id AS target_circ,
1209                         targ_ahr.id AS target_hold,
1210                         COALESCE(
1211                                 targ_circ.circ_lib,
1212                                 targ_ahr.pickup_lib
1213                         ) AS perm_lib
1214                 FROM action_trigger.event atev
1215                 JOIN action_trigger.event_definition atevdef ON
1216                         (atevdef.id = atev.event_def)
1217                 JOIN action_trigger.hook ath ON
1218                         (ath.key = atevdef.hook)
1219                 LEFT JOIN action.circulation targ_circ ON
1220                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1221                 LEFT JOIN action.hold_request targ_ahr ON
1222                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1223                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1224                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1225                                 'circ.staff.max_visible_event_age',
1226                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1227                         ) UNION
1228                         SELECT '1000 YEARS'::INTERVAL AS value
1229                 ) ous)
1230                 ]]></oils_persist:source_definition>
1231                 <fields oils_persist:primary="id">
1232                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1233                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1234                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1235                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1236                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1237                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1238                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1239                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1240                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1241                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1242                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1243                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1244                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1245                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1246                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1247                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1248                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1249                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1250                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1251                 </fields>
1252                 <links>
1253                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1254                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1255                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1256                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1257                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1258                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1259                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1260                 </links>
1261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1262                         <actions>
1263                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1264                         </actions>
1265                 </permacrud>
1266         </class>
1267
1268         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1269                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1270                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1271                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1272                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1273                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1274                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1275                 </fields>
1276                 <links>
1277                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1278                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1279                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1280                 </links>
1281         </class>
1282
1283         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1284                 <fields oils_persist:primary="code">
1285                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1286                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1287                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1288                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1289                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1290                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1291                 </fields>
1292                 <links/>
1293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1294             <actions>
1295                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1296                 <retrieve/>
1297                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1298                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1299             </actions>
1300         </permacrud>
1301         </class>
1302
1303         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1304                 <fields oils_persist:primary="code">
1305                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1306                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1307                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1308                 </fields>
1309                 <links/>
1310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1311             <actions>
1312                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1313                 <retrieve/>
1314                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1315                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1316             </actions>
1317         </permacrud>
1318         </class>
1319
1320         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1321                 <fields oils_persist:primary="code">
1322                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1323                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1324                 </fields>
1325                 <links/>
1326         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1327             <actions>
1328                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1329                 <retrieve/>
1330                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1331                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1332             </actions>
1333         </permacrud>
1334         </class>
1335
1336         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1337                 <fields oils_persist:primary="code">
1338                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1339                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1340                 </fields>
1341                 <links/>
1342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1343             <actions>
1344                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1345                 <retrieve/>
1346                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1347                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1348             </actions>
1349         </permacrud>
1350         </class>
1351
1352         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1353                 <fields oils_persist:primary="code">
1354                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1355                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359             <actions>
1360                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1361                 <retrieve/>
1362                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1363                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1364             </actions>
1365         </permacrud>
1366         </class>
1367
1368         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1369                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1370                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1371                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375             <actions>
1376                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1377                 <retrieve/>
1378                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1379                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1380             </actions>
1381         </permacrud>
1382         </class>
1383
1384         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1385                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1386                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1387                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1388                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1389                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1390                 </fields>
1391         <links>
1392             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1393             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1394             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1395         </links>
1396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1397             <actions>
1398                 <create permission="UPDATE_COPY">
1399                     <context link="target_copy" field="circ_lib"/>
1400                 </create>
1401                 <retrieve/>
1402                 <update permission="UPDATE_COPY">
1403                     <context link="target_copy" field="circ_lib"/>
1404                 </update>
1405                 <delete permission="UPDATE_COPY">
1406                     <context link="target_copy" field="circ_lib"/>
1407                 </delete>
1408             </actions>
1409         </permacrud>
1410         </class>
1411
1412         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1413                 <fields oils_persist:primary="code">
1414                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1415                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1416                 </fields>
1417                 <links/>
1418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1419             <actions>
1420                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1421                 <retrieve/>
1422                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1423                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1424             </actions>
1425         </permacrud>
1426         </class>
1427
1428         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1429                 <fields oils_persist:primary="code">
1430                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1431                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1432                 </fields>
1433                 <links/>
1434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1435             <actions>
1436                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1437                 <retrieve/>
1438                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1439                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1440             </actions>
1441         </permacrud>
1442         </class>
1443
1444         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1445                 <fields oils_persist:primary="code">
1446                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1447                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1448                 </fields>
1449                 <links/>
1450         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1451             <actions>
1452                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1453                 <retrieve/>
1454                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1455                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1456             </actions>
1457         </permacrud>
1458         </class>
1459
1460     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1461         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1462             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1463             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1464             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1465             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1466             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1467             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1468             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1469             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1470             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1471             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1472             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1473             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1474             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1475             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1476             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1477             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1478             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1479         </fields>
1480         <links/>
1481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1482             <actions>
1483                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1484                 <retrieve/>
1485                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1486                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1487             </actions>
1488         </permacrud>
1489     </class>
1490
1491     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1492         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1493             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1494             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1495             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1496             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1497             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1498             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1499             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1500             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1501             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1502             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1503             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1504             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1505             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1506             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1507             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1508             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1509             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1510             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1511             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1512         </fields>
1513         <links/>
1514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1515             <actions>
1516                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1517                 <retrieve/>
1518                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1519                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1520             </actions>
1521         </permacrud>
1522     </class>
1523
1524     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1525         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1526             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1527             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1528             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1529             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1530             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1531         </fields>
1532         <links>
1533             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1534             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1535             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1536         </links>
1537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1538             <actions>
1539                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1540                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1541                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1542                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1543             </actions>
1544         </permacrud>
1545     </class>
1546
1547         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1548                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1549                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1550                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1551                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1552                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1553                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1554                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1555                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1556                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1557                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1558                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1559                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1560                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1561                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1562                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1563                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1564                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1565             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1566                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1567                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1568                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1569                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1570                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1571                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1572                 </fields>
1573                 <links>
1574                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1575                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1576                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1577                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1578                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1579                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1580                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1581                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1582                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1583                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1584                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1585                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1586                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1587             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1588                 </links>
1589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1590             <actions>
1591                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1592                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1593                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1594                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1595             </actions>
1596         </permacrud>
1597         </class>
1598
1599         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1600                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1601                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1602                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1603                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1604                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1605                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1606                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1607                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1608                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1609                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1610                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1611                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1612                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1613                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1614                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1615                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1616             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1617                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1618                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1619             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1620                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1621                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1622                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1623                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1624             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1625             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1626             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1627                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1628                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1629                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1630                 </fields>
1631                 <links>
1632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1633                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1634                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1635                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1636                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1637                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1638                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1639                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1640                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1641                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1642                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1643                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1644                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1645                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1646             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1647                 </links>
1648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1649             <actions>
1650                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1651                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1652                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1653                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1654             </actions>
1655         </permacrud>
1656         </class>
1657
1658     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1659         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1660             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1661             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1662             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1663         </fields>
1664         <links/>
1665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1666             <actions>
1667                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1668                 <retrieve/>
1669                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1670                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1671             </actions>
1672         </permacrud>
1673     </class>
1674
1675     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1676         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1677             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1678             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1679             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1680             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1681             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1682             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1683             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1684         </fields>
1685         <links>
1686             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1687         </links>
1688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1689             <actions>
1690                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1691                 <retrieve/>
1692                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1693                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1694             </actions>
1695         </permacrud>
1696     </class>
1697
1698     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1699         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1700             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1701             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1702             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1703             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1704             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1705         </fields>
1706         <links>
1707             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1708             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1709         </links>
1710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1711             <actions>
1712                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1713                     <context link="matchpoint" field="org_unit"/>
1714                 </create>
1715                 <retrieve/>
1716                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1717                     <context link="matchpoint" field="org_unit"/>
1718                 </update>
1719                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1720                     <context link="matchpoint" field="org_unit"/>
1721                 </delete>
1722             </actions>
1723         </permacrud>
1724     </class>
1725
1726     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1727         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1728             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1729             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1730             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1731         </fields>
1732         <links>
1733             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1734             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1735         </links>
1736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1737             <actions>
1738                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1739                     <context link="limit_set" field="owning_lib"/>
1740                 </create>
1741                 <retrieve/>
1742                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1743                     <context link="limit_set" field="owning_lib"/>
1744                 </update>
1745                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1746                     <context link="limit_set" field="owning_lib"/>
1747                 </delete>
1748             </actions>
1749         </permacrud>
1750     </class>
1751     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1752         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1753             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1754             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1755             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1756         </fields>
1757         <links>
1758             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1759             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1760         </links>
1761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1762             <actions>
1763                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1764                     <context link="limit_set" field="owning_lib"/>
1765                 </create>
1766                 <retrieve/>
1767                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1768                     <context link="limit_set" field="owning_lib"/>
1769                 </update>
1770                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1771                     <context link="limit_set" field="owning_lib"/>
1772                 </delete>
1773             </actions>
1774         </permacrud>
1775     </class>
1776
1777     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1778         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1779             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1780             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1781             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1782             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1783         </fields>
1784         <links>
1785             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1786             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1787         </links>
1788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1789             <actions>
1790                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1791                     <context link="limit_set" field="owning_lib"/>
1792                 </create>
1793                 <retrieve/>
1794                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1795                     <context link="limit_set" field="owning_lib"/>
1796                 </update>
1797                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1798                     <context link="limit_set" field="owning_lib"/>
1799                 </delete>
1800             </actions>
1801         </permacrud>
1802     </class>
1803
1804         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1805                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1806                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1807                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1808                 </fields>
1809                 <links/>
1810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1811             <actions>
1812                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1813                 <retrieve/>
1814                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1815                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1816             </actions>
1817         </permacrud>
1818         </class>
1819
1820         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1821                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1822                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1823                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1824                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1825                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1826                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1827                 </fields>
1828                 <links>
1829                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1830                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1831                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1832                 </links>
1833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1834             <actions>
1835                 <create permission="ADMIN_SURVEY">
1836                     <context link="survey" field="owner"/>
1837                 </create>
1838                 <retrieve/>
1839                 <update permission="ADMIN_SURVEY">
1840                     <context link="survey" field="owner"/>
1841                 </update>
1842                 <delete permission="ADMIN_SURVEY">
1843                     <context link="survey" field="owner"/>
1844                 </delete>
1845             </actions>
1846         </permacrud>
1847         </class>
1848         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="">
1850                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1851                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1852                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1853                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1854                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1855                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1856                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1857                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1858                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1859                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1860                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1861                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1862                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1863                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1864                 </fields>
1865                 <links>
1866                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1867                 </links>
1868         </class>
1869         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1870                 <fields oils_persist:primary="id" oils_persist:sequence="">
1871                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1872                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1873                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1874                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1875                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1876                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1877                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1878                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1879                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1880                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1881                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1882                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1883                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1884                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1885                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1886                 </fields>
1887                 <links>
1888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1889                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1890                 </links>
1891         </class>
1892         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1894                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1895                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1896                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1897                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1898                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1899                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1900                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1901                 </fields>
1902                 <links>
1903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1904                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1905                 </links>
1906         </class>
1907         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1908                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1909                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1910                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1911                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1912                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1913                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1914                 </fields>
1915                 <links>
1916                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1917                 </links>
1918         </class>
1919         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1920                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1921                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1922                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1923                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1924                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1925                 </fields>
1926                 <links>
1927                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1928                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1929                 </links>
1930         </class>
1931         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1932                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1933                         <field name="field" reporter:datatype="link"/>
1934                         <field name="id" reporter:datatype="id" />
1935                         <field name="source" reporter:datatype="link"/>
1936                         <field name="value" reporter:datatype="text"/>
1937                 </fields>
1938                 <links>
1939                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1940                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1941                 </links>
1942         </class>
1943         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1944                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1945                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1946                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1947                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1948                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1949                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1950                 </fields>
1951                 <links>
1952                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1953                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1954                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1955                 </links>
1956         </class>
1957         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1958                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1959                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1960                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1961                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1962                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1963                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1964                 </fields>
1965                 <links>
1966                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1967                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1968                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1969                 </links>
1970         </class>
1971         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
1972                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1973                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1974                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1975                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1976                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1977                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1978                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1979                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1980                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1981                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1982                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1983                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1984                 </fields>
1985                 <links>
1986                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1987                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1988                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1989                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1990                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1991                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1992                 </links>
1993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1994             <actions>
1995                 <create permission="TRANSIT_COPY" context_field="owner">
1996                     <context link="target_copy" field="circ_lib"/>
1997                 </create>
1998                 <retrieve/>
1999                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2000                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2001             </actions>
2002         </permacrud>
2003         </class>
2004         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2005                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2006                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2007                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2008                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2009                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2010                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2011                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2012                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2013                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2014                 </fields>
2015                 <links>
2016                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2017                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2018                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2019                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2020                 </links>
2021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022             <actions>
2023                 <create permission="ADMIN_SURVEY">
2024                     <context link="survey" field="owner"/>
2025                 </create>
2026                 <retrieve/>
2027                 <update permission="ADMIN_SURVEY">
2028                     <context link="survey" field="owner"/>
2029                 </update>
2030                 <delete permission="ADMIN_SURVEY">
2031                     <context link="survey" field="owner"/>
2032                 </delete>
2033             </actions>
2034         </permacrud>
2035         </class>
2036         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2037                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2038                         <field name="bucket" />
2039                         <field name="id" reporter:datatype="id" />
2040                         <field name="target_copy" reporter:datatype="link"/>
2041                         <field name="create_time" reporter:datatype="timestamp" />
2042                         <field name="pos" reporter:datatype="int" />
2043                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2044                 </fields>
2045                 <links>
2046                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2047                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2048             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2049                 </links>
2050         </class>
2051         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2052                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2053                         <field name="id" reporter:datatype="id" />
2054                         <field name="item" reporter:datatype="link"/>
2055                         <field name="note" reporter:datatype="text" />
2056                 </fields>
2057                 <links>
2058                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2059                 </links>
2060         </class>
2061
2062         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2063                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2064                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2065                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2066                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2067                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2068                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2069                 </fields>
2070                 <links>
2071                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2072                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2073                 </links>
2074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2075                         <actions>
2076                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2077                                 <retrieve/>
2078                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2079                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2080                         </actions>
2081                 </permacrud>
2082         </class>
2083
2084         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2085                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2086                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2087                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2088                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2089                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2090                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2091                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2092                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2093                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2094                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2095                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2096                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2097                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2098                 </fields>
2099                 <links>
2100                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2101                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2102                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2103                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2104                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2105                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2106                 </links>
2107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2108                         <actions>
2109                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2110                                 <retrieve/>
2111                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2112                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2113                         </actions>
2114                 </permacrud>
2115         </class>
2116
2117         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2118                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2119                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2120                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2121                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2122                 </fields>
2123                 <links>
2124                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2125                 </links>
2126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2127                         <actions>
2128                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2129                                 <retrieve/>
2130                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2131                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2132                         </actions>
2133                 </permacrud>
2134         </class>
2135
2136         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2137                 <fields oils_persist:primary="code">
2138                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2139                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2140                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2141                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2142                 </fields>
2143                 <links>
2144                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2145                 </links>
2146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2147                         <actions>
2148                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2149                                 <retrieve/>
2150                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2151                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2152                         </actions>
2153                 </permacrud>
2154         </class>
2155
2156         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2157                 <fields oils_persist:primary="code">
2158                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2159                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2160                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2161                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2162                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2163                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2164                 </fields>
2165                 <links>
2166                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2167                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2168                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2169                 </links>
2170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2171                         <actions>
2172                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2173                                 <retrieve/>
2174                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2175                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179
2180     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2181         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2182             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2183             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2184             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2185         </fields>
2186         <links>
2187             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2188             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2189         </links>
2190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2191             <actions>
2192                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2193                 <retrieve/>
2194                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2195                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2196             </actions>
2197         </permacrud>
2198     </class>
2199
2200         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2201                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2202                         <field name="active" reporter:datatype="bool"/>
2203                         <field name="create_date" reporter:datatype="timestamp"/>
2204                         <field name="creator" />
2205                         <field name="deleted" reporter:datatype="bool"/>
2206                         <field name="edit_date" reporter:datatype="timestamp"/>
2207                         <field name="editor" />
2208                         <field name="id" reporter:datatype="id" />
2209                         <field name="last_xact_id" />
2210                         <field name="marc" />
2211                         <field name="source" />
2212                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2213                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2214                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2215                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2216                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2217                 </fields>
2218                 <links>
2219                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2220                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2221                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2222                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2223                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2224                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2225                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2226                 </links>
2227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2228                         <actions>
2229                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2230                                 <retrieve/>
2231                                 <update permission="UPDATE_MARC" global_required="true"/>
2232                                 <delete permission="UPDATE_MARC" global_required="true"/>
2233                         </actions>
2234                 </permacrud>
2235         </class>
2236         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2237                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2238                         <field name="char_encoding" />
2239                         <field name="id" />
2240                         <field name="record" />
2241                         <field name="record_status" />
2242                         <field name="thesaurus" />
2243                 </fields>
2244                 <links>
2245                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2246                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2247                 </links>
2248         </class>
2249         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2250                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2251                         <field name="id" reporter:datatype="id" />
2252                         <field name="bib" reporter:datatype="link" />
2253                         <field name="authority" reporter:datatype="link" />
2254                 </fields>
2255                 <links>
2256                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2257                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2258                 </links>
2259         </class>
2260         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2261                 <fields oils_persist:primary="code" oils_persist:sequence="">
2262                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2263                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2264                 </fields>
2265                 <links/>
2266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2267             <actions>
2268                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2269                 <retrieve/>
2270                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2271                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2272             </actions>
2273         </permacrud>
2274         </class>
2275         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2276                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2277                         <field name="accepting_usr" />
2278                         <field name="amount" reporter:datatype="money" />
2279                         <field name="amount_collected" reporter:datatype="money" />
2280                         <field name="approval_code" reporter:datatype="text"/>
2281                         <field name="cash_drawer" reporter:datatype="link"/>
2282                         <field name="cc_first_name" reporter:datatype="text"/>
2283                         <field name="cc_last_name" reporter:datatype="text"/>
2284                         <field name="cc_number" reporter:datatype="text"/>
2285                         <field name="cc_order_number" reporter:datatype="text"/>
2286                         <field name="cc_type" reporter:datatype="text"/>
2287                         <field name="cc_processor" reporter:datatype="text"/>
2288                         <field name="expire_month" reporter:datatype="int" />
2289                         <field name="expire_year" reporter:datatype="int" />
2290                         <field name="id" reporter:datatype="id" />
2291                         <field name="note" reporter:datatype="text"/>
2292                         <field name="payment_ts" reporter:datatype="timestamp"/>
2293                         <field name="xact" reporter:datatype="link"/>
2294                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2295                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2296                 </fields>
2297                 <links>
2298                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2299                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2300                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2301                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2302                 </links>
2303         </class>
2304         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2305                 <fields oils_persist:primary="name">
2306                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2307                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2308                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2309                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2310                 </fields>
2311                 <links/>
2312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2313             <actions>
2314                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2315                 <retrieve/>
2316                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2317                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2318             </actions>
2319         </permacrud>
2320         </class>
2321
2322         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2323                 <fields oils_persist:primary="alias">
2324                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2325                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2326                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2327                 </fields>
2328                 <links>
2329                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2330                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2331                 </links>
2332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2333             <actions>
2334                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2335                 <retrieve/>
2336                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2337                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2338             </actions>
2339         </permacrud>
2340         </class>
2341
2342         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2343                 <fields oils_persist:primary="name">
2344                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2345                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2346                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2347                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2348                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2349                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2350                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2351                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2352                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2353                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2354                 </fields>
2355                 <links>
2356                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2357                 </links>
2358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2359             <actions>
2360                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2361                 <retrieve/>
2362                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2363                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2364             </actions>
2365         </permacrud>
2366         </class>
2367
2368         <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">
2369                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2370                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2371                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2372                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2373                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2374                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2375                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2376                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2377                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2378                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2379                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2380                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2381                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2382                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2383                 </fields>
2384                 <links>
2385                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2386                 </links>
2387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2388             <actions>
2389                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2390                 <retrieve/>
2391                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2392                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2393             </actions>
2394         </permacrud>
2395         </class>
2396         <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">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2398                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2399                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2400                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2401                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2402                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2403                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2404                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2405                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2406                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2407                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2408                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2409                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2410                 </fields>
2411                 <links>
2412                 </links>
2413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2414                         <actions>
2415                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2416                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2417                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2418                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2419                         </actions>
2420                 </permacrud>
2421         </class>
2422         <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">
2423                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="name" reporter:datatype="text"/>
2426                         <field name="xpath" reporter:datatype="text"/>
2427                         <field name="format" reporter:datatype="link"/>
2428                         <field name="first_word" reporter:datatype="bool" />
2429                 </fields>
2430                 <links/>
2431         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2432             <actions>
2433                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2434                 <retrieve/>
2435                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2436                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2437             </actions>
2438         </permacrud>
2439         </class>
2440         <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">
2441                 <fields oils_persist:primary="code" oils_persist:sequence="">
2442                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2443                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2444                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2445                 </fields>
2446                 <links/>
2447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2448             <actions>
2449                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2450                 <retrieve/>
2451                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2452                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2453             </actions>
2454         </permacrud>
2455         </class>
2456         <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">
2457                 <fields oils_persist:primary="code" oils_persist:sequence="">
2458                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2459                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2460                 </fields>
2461                 <links/>
2462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2463             <actions>
2464                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2465                 <retrieve/>
2466                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2467                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2468             </actions>
2469         </permacrud>
2470         </class>
2471     <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">
2472         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2473             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2474             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2475             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2476             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2477         </fields>
2478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2479             <actions>
2480                 <retrieve/>
2481             </actions>
2482         </permacrud>
2483     </class>
2484         <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">
2485                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2486                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2487                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2488                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2489                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2490                 </fields>
2491                 <links>
2492                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2493                 </links>
2494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2495             <actions>
2496                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2497                 <retrieve/>
2498                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2499                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2500             </actions>
2501         </permacrud>
2502         </class>
2503         <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">
2504                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2505                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2506                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2507                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2508                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2509                 </fields>
2510                 <links>
2511                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2512                 </links>
2513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2514             <actions>
2515                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2516                 <retrieve/>
2517                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2518                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2519             </actions>
2520         </permacrud>
2521         </class>
2522         <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">
2523                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2524                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2525                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2526                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2527                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2528                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2529                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2530                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2531                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2532                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2533                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2534                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2535                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2536                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2537                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2538                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2539                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2540                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2541                 </fields>
2542                 <links>
2543                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2544                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2545                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2546                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2547                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2548                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2549                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2550                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2551                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2552                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2553                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2554                 </links>
2555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2556             <actions>
2557                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2558                 <retrieve/>
2559                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2560                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2561             </actions>
2562         </permacrud>
2563         </class>
2564         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2565                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2566                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2567                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2568                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2569                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2570                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2571                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2572                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2573                 </fields>
2574                 <links>
2575                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2576                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2577         </links>
2578         </class>
2579         <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">
2580                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2581                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2582                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2583                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2584                 </fields>
2585                 <links>
2586                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2587                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2588                 </links>
2589         </class>
2590         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2591                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2592                         <field name="id" reporter:datatype="id" />
2593                         <field name="value" oils_persist:i18n="true" />
2594                 </fields>
2595                 <links/>
2596         </class>
2597         <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">
2598                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2599                         <field name="balance_owed" reporter:datatype="money" />
2600                         <field name="total_owed" reporter:datatype="money" />
2601                         <field name="total_paid" reporter:datatype="money" />
2602                         <field name="usr" reporter:datatype="link"/>
2603                 </fields>
2604                 <links>
2605                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2606         </links>
2607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2608             <actions>
2609                 <retrieve permission="VIEW_USER">
2610                     <context link="usr" field="home_ou"/>
2611                 </retrieve>
2612             </actions>
2613         </permacrud>
2614         </class>
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2617                         <field name="collector" />
2618                         <field name="enter_time" reporter:datatype="timestamp"/>
2619                         <field name="id" reporter:datatype="id" />
2620                         <field name="location" reporter:datatype="link"/>
2621                         <field name="usr" reporter:datatype="link"/>
2622                 </fields>
2623                 <links>
2624                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2625                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2626                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2627                 </links>
2628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2629             <actions>
2630                 <create permission="money.collections_tracker.create" context_field="location"/>
2631                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2632                 <delete permission="money.collections_tracker.create" context_field="location"/>
2633             </actions>
2634         </permacrud>
2635         </class>
2636         <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">
2637                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2638                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2639                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2640                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2641                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2642                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2643                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2644                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2645                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2646                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2647                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2648                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2649                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2650                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2651                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2652                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2653                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2654                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2655                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2656                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2657                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2658                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2659                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2660                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2661                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2662                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2663                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2664                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2665                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2666                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2667                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2668                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2669                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2670                 </fields>
2671                 <links>
2672                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2673                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2674                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2675                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2676                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2677                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2678                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2679                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2680                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2681                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2682                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2683                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2684                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2685                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2686                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2687                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2688                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2689                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2690                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2691                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2692                 </links>
2693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2694             <actions>
2695                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2696                 <retrieve/>
2697                 <update permission="UPDATE_MARC" global_required="true"/>
2698             </actions>
2699         </permacrud>
2700         </class>
2701         <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">
2702                 <fields oils_persist:primary="id">
2703                         <field name="dow_0_close" />
2704                         <field name="dow_0_open" />
2705                         <field name="dow_1_close" />
2706                         <field name="dow_1_open" />
2707                         <field name="dow_2_close" />
2708                         <field name="dow_2_open" />
2709                         <field name="dow_3_close" />
2710                         <field name="dow_3_open" />
2711                         <field name="dow_4_close" />
2712                         <field name="dow_4_open" />
2713                         <field name="dow_5_close" />
2714                         <field name="dow_5_open" />
2715                         <field name="dow_6_close" />
2716                         <field name="dow_6_open" />
2717                         <field name="id" reporter:datatype="id" />
2718                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2719                 </fields>
2720                 <links>
2721                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2722                 </links>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2726                 <retrieve/>
2727                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2728                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2729             </actions>
2730         </permacrud>
2731         </class>
2732         <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">
2733                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2734                         <field name="id" reporter:datatype="id" />
2735                         <field name="record" reporter:datatype="link"/>
2736                         <field name="label" reporter:datatype="text"/>
2737                         <field name="label_sortkey" reporter:datatype="text"/>
2738                 </fields>
2739                 <links>
2740                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2741                 </links>
2742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2743             <actions>
2744                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2745                 <retrieve/>
2746                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2747                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2748             </actions>
2749         </permacrud>
2750         </class>
2751         <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">
2752                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2753                         <field name="id" reporter:datatype="id" />
2754                         <field name="target_copy" reporter:datatype="link" />
2755                         <field name="part" reporter:datatype="link"/>
2756                 </fields>
2757                 <links>
2758                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2759                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2760                 </links>
2761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2762             <actions>
2763                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2764                 <retrieve/>
2765                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2766                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2767             </actions>
2768         </permacrud>
2769         </class>
2770         <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">
2771                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2772                         <field name="close_end" reporter:datatype="timestamp" />
2773                         <field name="close_start" reporter:datatype="timestamp" />
2774                         <field name="id" reporter:datatype="id" />
2775                         <field name="org_unit" reporter:datatype="org_unit"/>
2776                         <field name="reason" reporter:datatype="text"/>
2777                 </fields>
2778                 <links>
2779                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2780                 </links>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2784                 <retrieve/>
2785                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2786                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2787             </actions>
2788         </permacrud>
2789         </class>
2790         <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">
2791                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2792                         <field name="extended" reporter:datatype="interval"/>
2793                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2794                         <field name="max_renewals" reporter:datatype="int" />
2795                         <field name="name" reporter:datatype="text"/>
2796                         <field name="normal" reporter:datatype="interval"/>
2797                         <field name="shrt" reporter:datatype="interval"/>
2798                 </fields>
2799                 <links>
2800                 </links>
2801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2802             <actions>
2803                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2804                 <retrieve/>
2805                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2806                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2807             </actions>
2808         </permacrud>
2809         </class>
2810
2811         <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">
2812                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2813                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2814                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2815             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2816                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2817             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2818                 </fields>
2819                 <links>
2820             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2821                 </links>
2822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2823             <actions>
2824                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2825                 <retrieve/>
2826                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2827                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2828             </actions>
2829                 </permacrud>
2830         </class>
2831
2832         <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">
2833                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2834                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2835                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2836                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2837             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2838                 </fields>
2839                 <links>
2840                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2841                 </links>
2842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2843             <actions>
2844                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2845                 <retrieve/>
2846                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2847                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2848             </actions>
2849                 </permacrud>
2850         </class>
2851
2852         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2853                 <fields oils_persist:primary="id" oils_persist:sequence="">
2854                         <field name="balance_owed" reporter:datatype="money"/>
2855                         <field name="id" reporter:datatype="id" />
2856                         <field name="last_billing_note" reporter:datatype="text"/>
2857                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2858                         <field name="last_billing_type" reporter:datatype="text"/>
2859                         <field name="last_payment_note" reporter:datatype="text"/>
2860                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2861                         <field name="last_payment_type" reporter:datatype="text"/>
2862                         <field name="total_owed" reporter:datatype="money"/>
2863                         <field name="total_paid" reporter:datatype="money"/>
2864                         <field name="usr" reporter:datatype="link"/>
2865                         <field name="xact_finish" reporter:datatype="timestamp" />
2866                         <field name="xact_start" reporter:datatype="timestamp" />
2867                         <field name="xact_type" reporter:datatype="text"/>
2868                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2869                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2870                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2871                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2872                         <field name="billing_location" reporter:datatype="link"/>
2873                 </fields>
2874                 <links>
2875                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2876                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2877                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2878                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2879                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2880                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2881                 </links>
2882         </class>
2883         <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">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2885                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2886                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2887                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2888                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2889                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2890                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2891                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2892                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2893                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2894                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2895                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2896                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2897                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2898                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2899                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2900                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2901                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2902                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2903                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2904                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2905                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2906                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2907                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2908                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2909                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2910                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2911                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2912                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2913                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2914                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2915                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2916                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2917                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2918                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2919                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2920                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2921                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2922                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2923                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2924                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2925                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2926                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2927                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2928                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2929                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2930                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2931                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2932                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2933                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2934                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2935                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2936                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2937                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2938                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2939                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2940                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2941                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2942                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2943                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2944                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2945                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2946                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2947                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2948                 </fields>
2949                 <links>
2950                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2951                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2952                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2953                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2954                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2955                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2956                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2957                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2958                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2959                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2960                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2961                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2962                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2963                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2964                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2965                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2966                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2967                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2968                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2969                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2970                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2971                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2972                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2973                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2974                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2975                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2976                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2977                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2978                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2979                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2980                 </links>
2981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2982                         <actions>
2983                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2984                         </actions>
2985                 </permacrud>
2986         </class>
2987         <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">
2988                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2989                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2990                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2991                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2992                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2993                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2994                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2995                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2996                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2997         </fields>
2998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2999                         <actions>
3000                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3001                                 <retrieve/>
3002                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3003                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3004                         </actions>
3005                 </permacrud>
3006         </class>
3007         <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">
3008                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3009                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3010                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3011                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3012                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3013         </fields>
3014         <links>
3015                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3016                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3017                 </links>
3018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3019                         <actions>
3020                                 <retrieve permission="RUN_REPORTS">
3021                                         <context link="usr" field="home_ou" />
3022                                 </retrieve>
3023                         </actions>
3024                 </permacrud>
3025         </class>
3026         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3027                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3028                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3029                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3030                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3031                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3032                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3033                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3034         </fields>
3035         <links>
3036                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3037                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3038                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3039                 </links>
3040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3041                         <actions>
3042                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3043                                         <context link="usr" field="home_ou" />
3044                                         <context link="ws" field="owning_lib" />
3045                                 </retrieve>
3046                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3047                                         <context link="usr" field="home_ou" />
3048                                         <context link="ws" field="owning_lib" />
3049                                 </create>
3050                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3051                                         <context link="usr" field="home_ou" />
3052                                         <context link="ws" field="owning_lib" />
3053                                 </update>
3054                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3055                                         <context link="usr" field="home_ou" />
3056                                         <context link="ws" field="owning_lib" />
3057                                 </delete>
3058                         </actions>
3059                 </permacrud>
3060         </class>
3061         <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">
3062                 <fields oils_persist:primary="name">
3063                         <field name="name" reporter:datatype="text"/>
3064                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3065                 </fields>
3066                 <links/>
3067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3068                         <actions>
3069                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3070                                 <retrieve/>
3071                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3072                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3073                         </actions>
3074                 </permacrud>
3075         </class>
3076         <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">
3077                 <fields oils_persist:primary="name">
3078                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3079                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3080                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3081                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3082                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3083                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3084                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3085                 </fields>
3086                 <links>
3087                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3088                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3089                 </links>
3090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091                         <actions>
3092                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3093                                 <retrieve/>
3094                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3095                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3096                         </actions>
3097                 </permacrud>
3098         </class>
3099         <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">
3100                 <fields oils_persist:primary="name">
3101                         <field name="name" reporter:datatype="text"/>
3102                         <field name="label" reporter:datatype="text"/>
3103                         <field name="description" reporter:datatype="text"/>
3104                         <field name="datatype" reporter:datatype="text"/>
3105                         <field name="view_perm" reporter:datatype="link"/>
3106                         <field name="update_perm" reporter:datatype="link"/>
3107                         <field name="fm_class" reporter:datatype="text"/>
3108                         <field name="grp" reporter:datatype="link"/>
3109                 </fields>
3110                 <links>
3111                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3112                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3113                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3114                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3115                 </links>
3116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3117                         <actions>
3118                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3119                                 <retrieve/>
3120                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3121                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3122                         </actions>
3123                 </permacrud>
3124         </class>
3125         <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">
3126                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3127                         <field name="id" />
3128                         <field name="name"  reporter:datatype="text"/>
3129                         <field name="org_unit" reporter:datatype="org_unit"/>
3130                         <field name="value"  reporter:datatype="text"/>
3131                 </fields>
3132                 <links>
3133                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3134                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3135                 </links>
3136         </class>
3137         <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">
3138                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3139                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3140                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3141                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3142                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3143                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3144                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3145                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3146                 </fields>
3147                 <links>
3148                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3149                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3150                 </links>
3151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3152             <actions>
3153                 <create permission="CREATE_COPY_NOTE">
3154                     <context link="owning_copy" field="circ_lib"/>
3155                 </create>
3156                 <retrieve permission="VIEW_COPY_NOTES">
3157                     <context link="owning_copy" field="circ_lib"/>
3158                 </retrieve>
3159                 <update permission="UPDATE_COPY_NOTE">
3160                     <context link="owning_copy" field="circ_lib"/>
3161                 </update>
3162                 <delete permission="DELETE_COPY_NOTE">
3163                     <context link="owning_copy" field="circ_lib"/>
3164                 </delete>
3165             </actions>
3166         </permacrud>
3167         </class>
3168         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3169                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3170                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3171                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3172                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3173                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3174                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3175                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3176                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3177                 </fields>
3178                 <links>
3179                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3180                 </links>
3181         </class>
3182         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3183                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3184                         <field name="fingerprint"  reporter:datatype="text"/>
3185                         <field name="id" reporter:datatype="id" />
3186                         <field name="master_record" reporter:datatype="link"/>
3187                         <field name="mods"  reporter:datatype="text"/>
3188                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3189                 </fields>
3190                 <links>
3191                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3192                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3193                 </links>
3194         </class>
3195         <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">
3196                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3197                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3198                         <field name="name"  reporter:datatype="text"/>
3199                 </fields>
3200                 <links/>
3201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3202             <actions>
3203                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3204                 <retrieve/>
3205                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3206                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3207             </actions>
3208         </permacrud>
3209         </class>
3210         <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">
3211                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3212                         <field name="code"  reporter:datatype="text"/>
3213                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3214                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3215                 </fields>
3216                 <links/>
3217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3218             <actions>
3219                 <create permission="CREATE_PERM" global_required="true"/>
3220                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3221                 <update permission="UPDATE_PERM" global_required="true"/>
3222                 <delete permission="DELETE_PERM" global_required="true"/>
3223             </actions>
3224         </permacrud>
3225         </class>
3226         <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">
3227                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3228                         <field name="id" reporter:datatype="id" />
3229                         <field name="metarecord" reporter:datatype="link"/>
3230                         <field name="source" reporter:datatype="link"/>
3231                 </fields>
3232                 <links>
3233                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3234                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3235                 </links>
3236         </class>
3237         <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">
3238                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3239                         <field name="id" reporter:datatype="id" />
3240                         <field name="field" reporter:datatype="link"/>
3241                         <field name="source" reporter:datatype="link"/>
3242                         <field name="value"  reporter:datatype="text"/>
3243                 </fields>
3244                 <links>
3245                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3246                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3247                 </links>
3248         </class>
3249         <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">
3250                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3251                         <field name="id" reporter:datatype="id" />
3252                         <field name="value" reporter:datatype="text"/>
3253                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3254                 </fields>
3255                 <links>
3256                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3257                 </links>
3258         </class>
3259         <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">
3260                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3261                         <field name="id" reporter:datatype="id" />
3262                         <field name="entry" reporter:datatype="link"/>
3263                         <field name="def" reporter:datatype="link"/>
3264                         <field name="source" reporter:datatype="link"/>
3265                 </fields>
3266                 <links>
3267                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3268                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3269                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3270                 </links>
3271         </class>
3272         <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">
3273                 <oils_persist:source_definition>
3274                         SELECT * FROM metabib.author_field_entry
3275                                                 UNION ALL
3276                         SELECT * FROM metabib.keyword_field_entry
3277                                                 UNION ALL
3278                         SELECT * FROM metabib.identifier_field_entry
3279                                                 UNION ALL
3280                         SELECT * FROM metabib.title_field_entry
3281                                                 UNION ALL
3282                         SELECT * FROM metabib.subject_field_entry
3283                                                 UNION ALL
3284                         SELECT * FROM metabib.series_field_entry
3285                 </oils_persist:source_definition>
3286                 <fields>
3287                         <field name="field" reporter:datatype="link"/>
3288                         <field name="id" reporter:datatype="id" />
3289                         <field name="source" reporter:datatype="link"/>
3290                         <field name="value"  reporter:datatype="text"/>
3291                 </fields>
3292                 <links>
3293                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3294                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3295                 </links>
3296         </class>
3297         <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">
3298                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3299                         <field name="field" reporter:datatype="link"/>
3300                         <field name="id" reporter:datatype="id" />
3301                         <field name="source" reporter:datatype="link"/>
3302                         <field name="value"  reporter:datatype="text"/>
3303                 </fields>
3304                 <links>
3305                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3306                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3307                 </links>
3308         </class>
3309         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3310                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3311                         <field name="accepting_usr" reporter:datatype="link"/>
3312                         <field name="amount" reporter:datatype="money" />
3313                         <field name="amount_collected" reporter:datatype="money" />
3314                         <field name="cash_drawer" reporter:datatype="link"/>
3315                         <field name="id" reporter:datatype="id" />
3316                         <field name="note"  reporter:datatype="text"/>
3317                         <field name="payment_ts" reporter:datatype="timestamp"/>
3318                         <field name="xact" reporter:datatype="link"/>
3319                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3320                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3321                 </fields>
3322                 <links>
3323                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3324                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3325                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3326                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3327                 </links>
3328         </class>
3329         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3330                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3331                         <field name="accepting_usr" reporter:datatype="link"/>
3332                         <field name="amount" reporter:datatype="money" />
3333                         <field name="amount_collected" reporter:datatype="money" />
3334                         <field name="id" reporter:datatype="id" />
3335                         <field name="note"  reporter:datatype="text"/>
3336                         <field name="payment_ts" reporter:datatype="timestamp"/>
3337                         <field name="xact" reporter:datatype="link"/>
3338                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3339                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3340                 </fields>
3341                 <links>
3342                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3343                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3344                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3345                 </links>
3346         </class>
3347         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3348                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3349                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3350                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3351                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3352                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3353                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3354                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3355                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3356                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3357                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3358                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3359                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3360                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3361                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3362                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3363                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3364                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3365                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3366                 </fields>
3367                 <links>
3368                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3369                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3370                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3371                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3372                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3373                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3374                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3375                 </links>
3376         </class>
3377
3378         <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">
3379                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3380                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3381                         <field name="name"  reporter:datatype="text"/>
3382                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3383                         <field name="block_list" reporter:datatype="text"/>
3384                         <field name="staff_alert" reporter:datatype="bool"/>
3385                         <field name="org_depth" reporter:datatype="int"/>
3386                 </fields>
3387                 <links/>
3388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3389             <actions>
3390                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3391                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3392                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3393                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3394             </actions>
3395         </permacrud>
3396         </class>
3397         <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">
3398                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3399                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3400                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3401                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3402                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3403                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3404                 </fields>
3405                 <links>
3406                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3407                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3408                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3409         </links>
3410         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3411             <actions>
3412                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3413                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3414                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3415                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3416             </actions>
3417         </permacrud>
3418         </class>
3419         <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">
3420                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3421                         <field name="holdable" reporter:datatype="bool"/>
3422                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3423                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3424                         <field name="opac_visible" reporter:datatype="bool"/>
3425             <field name="copy_active" reporter:datatype="bool"/>
3426             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3427                 </fields>
3428                 <links/>
3429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3430             <actions>
3431                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3432                 <retrieve/>
3433                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3434                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3435             </actions>
3436         </permacrud>
3437         </class>
3438         <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">
3439                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3440                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3441                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3442                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3443                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3444                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3445                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3446                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3447                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3448                 </fields>
3449                 <links>
3450                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3451                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3452                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3453                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3454                 </links>
3455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3456                         <actions>
3457                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3458                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3459                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3460                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3461                         </actions>
3462                 </permacrud>
3463         </class>
3464         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3466                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3467                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3468                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3469                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3470                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3471                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3472                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3473                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3474                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3475                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3476                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3477                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3478                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3479                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3480                 </fields>
3481                 <links>
3482                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3483                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3484                 </links>
3485         </class>
3486         <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">
3487                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3488                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3489                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3490                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3491                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3492                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3493                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3494                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3495                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3496                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3497                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3498                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3499                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3500                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3501                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3502                 </fields>
3503                 <links>
3504                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3505                 </links>
3506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3507                         <actions>
3508                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3509                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3510                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3511                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3512                         </actions>
3513                 </permacrud>
3514         </class>
3515
3516
3517         <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">
3518                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3519                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3520                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3521                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3522                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3523                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3524                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3525                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3526                 </fields>
3527                 <links>
3528                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3529                 </links>
3530         </class>
3531
3532         <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">
3533                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3534                         <field name="call_number" />
3535                         <field name="create_date" reporter:datatype="timestamp"/>
3536                         <field name="creator" reporter:datatype="link"/>
3537                         <field name="id" reporter:datatype="id" />
3538                         <field name="pub" reporter:datatype="bool"/>
3539                         <field name="title"  reporter:datatype="text"/>
3540                         <field name="value"  reporter:datatype="text"/>
3541                 </fields>
3542                 <links>
3543                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3544                 </links>
3545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3546             <actions>
3547                 <create permission="CREATE_VOLUME_NOTE">
3548                     <context link="call_number" field="owning_lib"/>
3549                 </create>
3550                 <retrieve permission="VIEW_VOLUME_NOTES">
3551                     <context link="call_number" field="owning_lib"/>
3552                 </retrieve>
3553                 <update permission="UPDATE_VOLUME_NOTE">
3554                     <context link="call_number" field="owning_lib"/>
3555                 </update>
3556                 <delete permission="DELETE_VOLUME_NOTE">
3557                     <context link="call_number" field="owning_lib"/>
3558                 </delete>
3559             </actions>
3560         </permacrud>
3561         </class>
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3564                         <field name="create_date" reporter:datatype="timestamp"/>
3565                         <field name="creator" reporter:datatype="link"/>
3566                         <field name="edit_date" reporter:datatype="timestamp"/>
3567                         <field name="editor" reporter:datatype="link"/>
3568                         <field name="id" reporter:datatype="id" />
3569                         <field name="record" reporter:datatype="link"/>
3570                         <field name="value" reporter:datatype="text"/>
3571                 </fields>
3572                 <links>
3573                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3578                 <retrieve/>
3579                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3580                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3581             </actions>
3582         </permacrud>
3583         </class>
3584         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3585         <oils_persist:source_definition>
3586 SELECT  usr,
3587         SUM(
3588             CASE
3589                 WHEN (
3590                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3591                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3592                 ) THEN 1
3593                 ELSE 0
3594             END
3595         ) AS out,
3596
3597         SUM(
3598             CASE
3599                 WHEN (
3600                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3601                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3602                 ) THEN 1
3603                 ELSE 0
3604             END
3605         ) AS overdue,
3606
3607         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3608         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3609         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3610   FROM  action.circulation
3611   WHERE checkin_time IS NULL
3612   GROUP BY 1
3613         </oils_persist:source_definition>
3614         <fields oils_persist:primary="usr">
3615             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3616             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3617             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3618             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3619             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3620             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3621         </fields>
3622         <links>
3623             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3624         </links>
3625         </class>
3626         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3627         <oils_persist:source_definition>
3628 SELECT  usr,
3629         ARRAY_TO_STRING(ARRAY_ACCUM(
3630             CASE
3631                 WHEN (
3632                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3633                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3634                 ) THEN id
3635                 ELSE 0
3636             END
3637         ),',') AS out,
3638
3639         ARRAY_TO_STRING(ARRAY_ACCUM(
3640             CASE
3641                 WHEN (
3642                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3643                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3644                 ) THEN id
3645                 ELSE 0
3646             END
3647         ),',') AS overdue,
3648
3649         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3650         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3651         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3652   FROM  action.circulation
3653   WHERE checkin_time IS NULL
3654   GROUP BY 1
3655         </oils_persist:source_definition>
3656         <fields oils_persist:primary="usr">
3657             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3658             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3659             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3660             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3661             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3662             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3663         </fields>
3664         <links>
3665             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3666         </links>
3667         </class>
3668         <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">
3669                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3670                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3671                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3672                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3673                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3674                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3675                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3676                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3677                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3678                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3679                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3680                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3681                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3682                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3683                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3684                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3685                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3686                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3687                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3688                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3689                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3690                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3691                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3692                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3693                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3694                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3695                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3696                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3697                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3698                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3699                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3700                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3701                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3702                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3703                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3704                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3705                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3706                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3707                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3708                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3709                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3710                 </fields>
3711                 <links>
3712                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3713                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3714                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3715                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3716                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3717                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3718                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3719                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3720                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3721                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3722                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3723                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3724                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3725                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3726                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3727                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3728                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3729                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3730                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3731                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3732                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3733                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3734                 </links>
3735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3736                         <actions>
3737                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3738                         </actions>
3739                 </permacrud>
3740         </class>
3741         <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">
3742                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3743                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3744                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3745                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3746                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3747                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3748                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3749                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3750                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3751                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3752                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3753                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3754                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3755                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3756                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3757                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3758                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3759                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3760                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3761                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3762                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3763                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3764                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3765                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3766                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3767                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3768                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3769                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3770                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3771                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3772                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3773                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3774                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3775                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3776                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3777                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3778                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3779                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3780                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3781                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3782                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3783                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3784                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3785                 </fields>
3786                 <links>
3787                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3788                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3789                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3790                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3791                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3792                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3793                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3794                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3795                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3796                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3797                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3798                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3799                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3800                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3801                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3802                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3803                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3804                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3805                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3806                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3807                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3808                 </links>
3809         </class>
3810         <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">
3811                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3812                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3813                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3814                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3815                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3816                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3817                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3818                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3819                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3820                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3821                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3822                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3823                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3824                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3825                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3826                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3827                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3828                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3829                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3830                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3831                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3832                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3833                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3834                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3835                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3836                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3837                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3838                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3839                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3840                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3841                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3842                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3843                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3844                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3845                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3846                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3847                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3848                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3849                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3850                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3851                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3852                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3853                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3854                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3855                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3856                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3857                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3858                 </fields>
3859                 <links>
3860                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3861                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3862                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3863                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3864                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3865                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3866                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3867                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3868                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3869                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3870                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3871                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3872                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3873                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3874                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3875                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3876                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3877                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3878                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3879                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3880                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3881                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3882                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3883                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3884                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3885                 </links>
3886         </class>
3887
3888         <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">
3889                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3890                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3891                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3892                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3893                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3894                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3895                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3896                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3897                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3898                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3899                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3900                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3901                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3902                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3903                 </fields>
3904                 <links>
3905                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3906                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3907                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3908                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3909                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3910                 </links>
3911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3912                         <actions>
3913                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3914                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3915                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3916                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3917                         </actions>
3918                 </permacrud>
3919         </class>
3920
3921         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3922                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3923                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3924                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3925                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3926                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3927                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3928                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3929                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3930                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3931                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3938                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3939                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3940                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3941                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3942                 </links>
3943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3944                         <actions>
3945                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3946                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3947                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3948                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3949                         </actions>
3950                 </permacrud>
3951         </class>
3952         
3953         <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">
3954                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3955                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3956                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3957                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3958                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3959                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3960                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3961                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3962                 </fields>
3963                 <links>
3964                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3965                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3966                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3967                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3968                 </links>
3969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3970                         <actions>
3971                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3972                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3973                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3974                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3975                         </actions>
3976                 </permacrud>
3977         </class>
3978         
3979         <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">
3980                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3981                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3982                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3983                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3984                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3985                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3986                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3987                 </fields>
3988                 <links>
3989                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3990                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3991                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3992                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3993                 </links>
3994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3995                         <actions>
3996                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3997                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3998                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3999                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4000                         </actions>
4001                 </permacrud>
4002         </class>
4003         
4004         <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">
4005                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4006                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4007                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4008                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4009                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4010                 </fields>
4011                 <links>
4012                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4013                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4014                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4015                 </links>
4016                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4017                         <actions>
4018                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4019                     <context link="resource" field="owner" />
4020                 </create>
4021                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4022                     <context link="resource" field="owner" />
4023                 </retrieve>
4024                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4025                     <context link="resource" field="owner" />
4026                 </update>
4027                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4028                     <context link="resource" field="owner" />
4029                 </delete>
4030                         </actions>
4031                 </permacrud>
4032         </class>
4033         
4034         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4035                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4036                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4037                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4038                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4039                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4040                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4041                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4042                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4043                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4044                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4045                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4046                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4047                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4048                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4050                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4051                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4052                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4053                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4054                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4055                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4056                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4057                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4058                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4059                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4060                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4061                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4062                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4063                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4064                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4065                 </fields>
4066                 <links>
4067                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4068                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4069                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4070                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4071                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4072                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4073                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4074                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4075                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4076                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4077                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4078                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4079                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4080                 </links>
4081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4082                         <actions>
4083                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4084                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4085                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4086                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4087                         </actions>
4088                 </permacrud>
4089         </class>
4090         
4091         <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">
4092                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4093                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4094                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4095                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4096                 </fields>
4097                 <links>
4098                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4099                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4100                 </links>
4101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4102                         <actions>
4103                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4104                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4105                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4106                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4107                         </actions>
4108                 </permacrud>
4109         </class>
4110
4111         <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">
4112                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4113                         <field name="bucket" reporter:datatype="link"/>
4114                         <field name="id" reporter:datatype="id" />
4115                         <field name="target_call_number" reporter:datatype="link" />
4116                         <field name="create_time" reporter:datatype="timestamp" />
4117                         <field name="pos" reporter:datatype="int" />
4118                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4119                 </fields>
4120                 <links>
4121                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4122                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4123             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4124                 </links>
4125         </class>
4126         <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">
4127                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4128                         <field name="id" reporter:datatype="id" />
4129                         <field name="item" reporter:datatype="link"/>
4130                         <field name="note" reporter:datatype="text" />
4131                 </fields>
4132                 <links>
4133                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4134                 </links>
4135         </class>
4136         <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">
4137                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4138                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4139                         <field name="btype" reporter:datatype="text"/>
4140                         <field name="id" reporter:datatype="id" />
4141                         <field name="name" reporter:datatype="text"/>
4142                         <field name="description" reporter:datatype="text"/>
4143                         <field name="owner" reporter:datatype="link"/>
4144                         <field name="pub" reporter:datatype="bool"/>
4145                         <field name="create_time" reporter:datatype="timestamp" />
4146                 </fields>
4147                 <links>
4148                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4149                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4150                 </links>
4151         </class>
4152         <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">
4153                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4154                         <field name="id" reporter:datatype="id" />
4155                         <field name="bucket" reporter:datatype="link"/>
4156                         <field name="note" reporter:datatype="text" />
4157                 </fields>
4158                 <links>
4159                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4160                 </links>
4161         </class>
4162         <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">
4163                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4164                         <field name="hold" reporter:datatype="link"/>
4165                         <field name="id" reporter:datatype="id" />
4166                         <field name="target_copy" reporter:datatype="link"/>
4167                         <field name="proximity" reporter:datatype="number"/>
4168                 </fields>
4169                 <links>
4170                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4171                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4172                 </links>
4173         </class>
4174         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4175                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4176                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4177                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4178                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4179                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4180                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4181                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4182                 </fields>
4183                 <links>
4184                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4185                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4186                 </links>
4187         </class>
4188         <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">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4190                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4191                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4192                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4193                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4194                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4195                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4196                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4197                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4198                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4199                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4200                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4201                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4202                 </fields>
4203                 <links>
4204                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4205                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4206                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4207                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4208                 </links>
4209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4210             <actions>
4211                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4212                 <retrieve/>
4213                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4214                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4215             </actions>
4216         </permacrud>
4217         </class>
4218         <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">
4219                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4220                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4221                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4222                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4223                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4224             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4225             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4226             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4227                 </fields>
4228                 <links>
4229                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4230                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4231                 </links>
4232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4233             <actions>
4234                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4235                 <retrieve/>
4236                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4237                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4238             </actions>
4239         </permacrud>
4240         </class>
4241         <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">
4242                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4243                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4244             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4245             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4246                 </fields>
4247                 <links>
4248                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4249                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4250                 </links>
4251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4252             <actions>
4253                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4254                                         <context link="lgroup" field="owner" />
4255                 </create>
4256                 <retrieve/>
4257                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4258                                         <context link="lgroup" field="owner" />
4259                 </update>
4260                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4261                                         <context link="lgroup" field="owner" />
4262                 </delete>
4263             </actions>
4264         </permacrud>
4265         </class>
4266
4267     <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">
4268         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4269             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4270             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4271             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4272             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4273         </fields>
4274         <links>
4275             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4276             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4277         </links>
4278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4279             <actions>
4280                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4281                 <retrieve/>
4282                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4283                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4284             </actions>
4285         </permacrud>
4286     </class>
4287
4288         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4289                 <fields>
4290                         <field name="sre_id" oils_persist:virtual="true" />
4291                         <field name="location" oils_persist:virtual="true" />
4292                         <field name="owning_lib" oils_persist:virtual="true" />
4293                         <field name="basic_holdings" oils_persist:virtual="true" />
4294                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4295                         <field name="supplement_holdings" oils_persist:virtual="true" />
4296                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4297                         <field name="index_holdings" oils_persist:virtual="true" />
4298                         <field name="index_holdings_add" oils_persist:virtual="true" />
4299                         <field name="online" oils_persist:virtual="true" />
4300                         <field name="missing" oils_persist:virtual="true" />
4301                         <field name="incomplete" oils_persist:virtual="true" />
4302                 </fields>
4303         </class>
4304
4305         <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">
4306                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4307                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4308                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4309                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4310                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4311                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4312                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4313                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4314                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4315                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4316                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4317                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4318                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4319                 </fields>
4320                 <links>
4321                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4322                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4323                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4324                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4325                 </links>
4326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4327                         <actions>
4328                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4329                                 <retrieve/>
4330                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4331                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4332                         </actions>
4333                 </permacrud>
4334         </class>
4335
4336         <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">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4338                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4339                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4340                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4341                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4342                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4343                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4344                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4345                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4346                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4347                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4348                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4349                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4350                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4351                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4352                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4353                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4354                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4355                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4356                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4357                 </fields>
4358                 <links>
4359                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4360                 </links>
4361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4362                         <actions>
4363                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4364                                         <context link="subscription" field="owning_lib" />
4365                                 </create>
4366                                 <retrieve />
4367                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4368                                         <context link="subscription" field="owning_lib" />
4369                                 </update>
4370                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4371                                         <context link="subscription" field="owning_lib" />
4372                                 </delete>
4373                         </actions>
4374                 </permacrud>
4375         </class>
4376
4377         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4378                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4379                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4380                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4381                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4382                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4383                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4384                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4385                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4386                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4387                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4388                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4389                 </fields>
4390                 <links>
4391                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4392                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4393                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4394                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4395                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4396                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4397                 </links>
4398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4399                         <actions>
4400                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4401                                 <retrieve />
4402                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4403                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4404                         </actions>
4405                 </permacrud>
4406         </class>
4407
4408         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4409                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4411                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4412                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4413                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4414                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4415                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4416                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4417                 </fields>
4418                 <links>
4419                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4420                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4421                 </links>
4422         </class>
4423
4424         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4425                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4426                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4427                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4428                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4429                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4430                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4431                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4432                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4433                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4434                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4435                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4436                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4437                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4438                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4439                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4440                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4441                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4442                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4443                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4444                 </fields>
4445                 <links>
4446                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4447                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4448                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4449                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4450                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4451                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4452                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4453                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4454                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4455                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4456                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4457                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4458                 </links>
4459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4460                         <actions>
4461                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4462                                 <retrieve />
4463                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4464                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4465                         </actions>
4466                 </permacrud>
4467         </class>
4468
4469         <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">
4470                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4471                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4472                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4473                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4474                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4475                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4476                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4477                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4478                 </fields>
4479                 <links>
4480                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4482                 </links>
4483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4484                         <actions>
4485                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4486                                         <context link="distribution" field="holding_lib" />
4487                                 </create>
4488                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4489                                         <context link="distribution" field="holding_lib" />
4490                                 </retrieve>
4491                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4492                                         <context link="distribution" field="holding_lib" />
4493                                 </update>
4494                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4495                                         <context link="distribution" field="holding_lib" />
4496                                 </delete>
4497                         </actions>
4498                 </permacrud>
4499         </class>
4500
4501         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4502                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4503                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4504                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4505                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4506                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4507                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4508                 </fields>
4509                 <links>
4510                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4511                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4512                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4513                 </links>
4514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4515                         <actions>
4516                                 <create permission="ADMIN_SERIAL_STREAM">
4517                                         <context link="distribution" field="holding_lib" />
4518                                 </create>
4519                                 <retrieve />
4520                                 <update permission="ADMIN_SERIAL_STREAM">
4521                                         <context link="distribution" field="holding_lib" />
4522                                 </update>
4523                                 <delete permission="ADMIN_SERIAL_STREAM">
4524                                         <context link="distribution" field="holding_lib" />
4525                                 </delete>
4526                         </actions>
4527                 </permacrud>
4528         </class>
4529
4530         <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">
4531                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4532                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4533                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4534                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4535                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4536                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4537                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4538                 </fields>
4539                 <links>
4540                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4541                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4542                 </links>
4543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4544                         <actions>
4545                                 <create permission="ADMIN_SERIAL_STREAM">
4546                                         <context link="stream" jump="distribution" field="holding_lib" />
4547                                 </create>
4548                                 <retrieve permission="RECEIVE_SERIAL">
4549                                         <context link="stream" jump="distribution" field="holding_lib" />
4550                                 </retrieve>
4551                                 <update permission="ADMIN_SERIAL_STREAM">
4552                                         <context link="stream" jump="distribution" field="holding_lib" />
4553                                 </update>
4554                                 <delete permission="ADMIN_SERIAL_STREAM">
4555                                         <context link="stream" jump="distribution" field="holding_lib" />
4556                                 </delete>
4557                         </actions>
4558                 </permacrud>
4559         </class>
4560
4561         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4562                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4563                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4564                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4565                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4566                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4567                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4568                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4569                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4570                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4571                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4572                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4573                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4574                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4575                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4576                 </fields>
4577                 <links>
4578                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4579                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4580                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4581                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4582                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4583                 </links>
4584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4585                         <actions>
4586                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4587                                         <context link="subscription" field="owning_lib" />
4588                                 </create>
4589                                 <retrieve/>
4590                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4591                                         <context link="subscription" field="owning_lib" />
4592                                 </update>
4593                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4594                                         <context link="subscription" field="owning_lib" />
4595                                 </delete>
4596                         </actions>
4597                 </permacrud>
4598         </class>
4599
4600         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4601                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4602                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4603                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4604                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4605                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4606                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4607                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4608                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4609                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4610                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4611                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4612                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4613                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4614                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4615                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4616                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4617                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4618                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4619                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4620                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4621                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4622                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4623                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4624                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4625                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4626                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4627                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4628                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4629                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4630                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4631                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4632                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4633                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4634                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4635                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4636                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4637                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4638                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4639                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4640                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4641                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4642                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4643                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4644                 </fields>
4645                 <links>
4646                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4647                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4648                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4649                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4650                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4651                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4652                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4653                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4654                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4655                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4656                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4657                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4658                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4659                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4660                 </links>
4661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4662                         <actions>
4663                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4664                                 <retrieve/>
4665                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4666                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4667                         </actions>
4668                 </permacrud>
4669         </class>
4670
4671         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4672                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4673                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4674                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4675                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4676                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4677                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4678                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4679                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4680                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4681                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4682                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4683                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4684                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4685                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4686                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4687                 </fields>
4688                 <links>
4689                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4690                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4691                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4692                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4693                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4694                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4695                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4696                 </links>
4697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4698                         <actions>
4699                                 <create permission="ADMIN_SERIAL_ITEM">
4700                                         <context link="stream" jump="distribution" field="holding_lib" />
4701                                 </create>
4702                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4703                                         <context link="stream" jump="distribution" field="holding_lib" />
4704                                 </retrieve>
4705                                 <update permission="ADMIN_SERIAL_ITEM">
4706                                         <context link="stream" jump="distribution" field="holding_lib" />
4707                                 </update>
4708                                 <delete permission="ADMIN_SERIAL_ITEM">
4709                                         <context link="stream" jump="distribution" field="holding_lib" />
4710                                 </delete>
4711                         </actions>
4712                 </permacrud>
4713         </class>
4714
4715         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4716                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4717                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4718                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4719                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4720                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4721                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4722                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4723                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4724                 </fields>
4725                 <links>
4726                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4728                 </links>
4729                 <!-- Not available via PCRUD at this time -->
4730         </class>
4731         <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">
4732                 <fields>
4733                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4734                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4735                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4736                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4737                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4738                 </fields>
4739                 <links>
4740                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4741                 </links>
4742         </class>
4743         <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">
4744                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4745                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4746                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4747                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4748                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4749                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4750                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4751                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4752                 </fields>
4753                 <links>
4754                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4755                 </links>
4756         </class>
4757         <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">
4758                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4759                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4760                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4761                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4762                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4763                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4764                 </fields>
4765                 <links>
4766                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4767                 </links>
4768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4769                         <actions>
4770                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4771                                         <context link="distribution" field="holding_lib" />
4772                                 </create>
4773                                 <retrieve/>
4774                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4775                                         <context link="distribution" field="holding_lib" />
4776                                 </update>
4777                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4778                                         <context link="distribution" field="holding_lib" />
4779                                 </delete>
4780                         </actions>
4781                 </permacrud>
4782         </class>
4783
4784         <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">
4785                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4786                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4787                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4788                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4789                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4790                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4791                 </fields>
4792                 <links>
4793                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4794                 </links>
4795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4796                         <actions>
4797                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4798                                         <context link="distribution" field="holding_lib" />
4799                                 </create>
4800                                 <retrieve/>
4801                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4802                                         <context link="distribution" field="holding_lib" />
4803                                 </update>
4804                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4805                                         <context link="distribution" field="holding_lib" />
4806                                 </delete>
4807                         </actions>
4808                 </permacrud>
4809         </class>
4810
4811         <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">
4812                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4813                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4814                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4815                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4816                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4817                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4818                 </fields>
4819                 <links>
4820                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4821                 </links>
4822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4823                         <actions>
4824                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4825                                         <context link="distribution" field="holding_lib" />
4826                                 </create>
4827                                 <retrieve/>
4828                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4829                                         <context link="distribution" field="holding_lib" />
4830                                 </update>
4831                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4832                                         <context link="distribution" field="holding_lib" />
4833                                 </delete>
4834                         </actions>
4835                 </permacrud>
4836         </class>
4837
4838         <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">
4839                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4840                         <field name="id" reporter:datatype="id" />
4841                         <field name="owning_copy" reporter:datatype="link"/>
4842                         <field name="stat_cat" reporter:datatype="link"/>
4843                         <field name="stat_cat_entry" reporter:datatype="link"/>
4844                 </fields>
4845                 <links>
4846                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4847                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4848                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4849                 </links>
4850         </class>
4851         <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">
4852                 <fields oils_persist:primary="code">
4853                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4854                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4855                 </fields>
4856                 <links/>
4857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4858             <actions>
4859                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4860                 <retrieve/>
4861                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4862                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4863             </actions>
4864         </permacrud>
4865         </class>
4866         <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">
4867                 <fields oils_persist:primary="code">
4868                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4869                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4870                 </fields>
4871                 <links/>
4872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4873             <actions>
4874                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4875                 <retrieve/>
4876                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4877                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4878             </actions>
4879         </permacrud>
4880         </class>
4881         <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">
4882                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4883                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4884                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4885                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4886                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4887                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4888                 </fields>
4889                 <links>
4890             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4891         </links>
4892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4893             <actions>
4894                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4895                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4896                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4897                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4898             </actions>
4899         </permacrud>
4900         </class>
4901         <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">
4902                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4903                         <field name="id" reporter:datatype="id" />
4904                         <field name="name" reporter:datatype="text"/>
4905                 </fields>
4906                 <links/>
4907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4908             <actions>
4909                 <create permission="CREATE_LASSO" global_required="true"/>
4910                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4911                 <update permission="UPDATE_LASSO" global_required="true"/>
4912                 <delete permission="DELETE_LASSO" global_required="true"/>
4913             </actions>
4914         </permacrud>
4915         </class>
4916         <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">
4917                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4918                         <field name="id" reporter:datatype="id" />
4919                         <field name="lasso" reporter:datatype="link"/>
4920                         <field name="org_unit" reporter:datatype="org_unit"/>
4921                 </fields>
4922                 <links>
4923                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4924                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4925                 </links>
4926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4927             <actions>
4928                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4929                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4930                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4931                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4932             </actions>
4933         </permacrud>
4934         </class>
4935         <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">
4936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4937                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4938                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4939                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4940                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4941                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4942                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4943                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4944                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4945                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4946                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4947                 </fields>
4948                 <links>
4949                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4951                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4952                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4953                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4954                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4955                 </links>
4956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4957             <actions>
4958                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4959                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4960                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4961                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4962             </actions>
4963         </permacrud>
4964         </class>
4965         <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">
4966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4967                         <field name="id" reporter:datatype="id" />
4968                         <field name="from_org" reporter:datatype="org_unit"/>
4969                         <field name="to_org" reporter:datatype="org_unit"/>
4970                         <field name="prox" reporter:datatype="int" />
4971                 </fields>
4972                 <links>
4973                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4974                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4975                 </links>
4976         </class>
4977         <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">
4978                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4979                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4980                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4981                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4982                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4983                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4984                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4985                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4986                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4987                 </fields>
4988                 <links/>
4989         </class>
4990         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4991                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4992                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4993                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4994                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4995                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4996                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4997                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4998                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4999                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5000                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5001                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5002                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5003                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5004                 </fields>
5005                 <links>
5006                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5007                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5008                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5009                 </links>
5010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5011             <actions>
5012                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5013                 <retrieve/>
5014                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5015                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5016             </actions>
5017         </permacrud>
5018         </class>
5019         <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">
5020                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5021                         <field name="address_type"  reporter:datatype="text"/>
5022                         <field name="city"  reporter:datatype="text"/>
5023                         <field name="country"  reporter:datatype="text"/>
5024                         <field name="county"  reporter:datatype="text"/>
5025                         <field name="id" reporter:datatype="id" />
5026                         <field name="org_unit" reporter:datatype="org_unit"/>
5027                         <field name="post_code"  reporter:datatype="text"/>
5028                         <field name="state"  reporter:datatype="text"/>
5029                         <field name="street1"  reporter:datatype="text"/>
5030                         <field name="street2"  reporter:datatype="text"/>
5031                         <field name="valid" reporter:datatype="bool"/>
5032                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5033                 </fields>
5034                 <links>
5035                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5036                 </links>
5037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5038             <actions>
5039                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5040                 <retrieve/>
5041                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5042                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5043             </actions>
5044         </permacrud>
5045         </class>
5046         <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">
5047                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5048                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5049                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5050                         <field name="query_text" reporter:datatype="text"/>
5051                 </fields>
5052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5053             <actions>
5054                 <retrieve/>
5055             </actions>
5056         </permacrud>
5057         </class>
5058
5059         <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">
5060                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5061                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5062                         <field name="owner" reporter:datatype="org_unit"/>
5063                         <field name="code" reporter:datatype="text"/>
5064                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5065                         <field name="create_date" reporter:datatype="timestamp"/>
5066                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5067                 </fields>
5068                 <links>
5069                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5070                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5071                 </links>
5072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5073             <actions>
5074                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5075                 <retrieve/>
5076                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5077                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5078             </actions>
5079         </permacrud>
5080         </class>
5081         <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">
5082                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5083                         <field name="id" reporter:datatype="id"/>
5084                         <field name="grp" reporter:datatype="link"/>
5085                         <field name="pos" reporter:datatype="int"/>
5086                         <field name="query" reporter:datatype="link"/>
5087                 </fields>
5088                 <links>
5089                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5090                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5091                 </links>
5092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5093             <actions>
5094                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5095                     <context link="grp" field="owner"/>
5096                 </create>
5097                 <retrieve/>
5098                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5099                     <context link="grp" field="owner"/>
5100                 </update>
5101                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5102                     <context link="grp" field="owner"/>
5103                 </delete>
5104             </actions>
5105         </permacrud>
5106         </class>
5107
5108         <!-- A note: Please update alhr and ahopl when updating ahr -->
5109         <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">
5110                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5111                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5112                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5113                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5114                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5115                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5116                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5117                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5118                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5119                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5120                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5121                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5122                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5123                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5124                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5125                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5126                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5127                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5128                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5129                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5130                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5131                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5132                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5133                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5134                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5135                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5136                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5137                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5138                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5139                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5140                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5141                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5142                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5145                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5146                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5147                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5148                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5150                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5151                 </fields>
5152                 <links>
5153                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5154                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5155                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5156                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5157                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5158                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5159                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5160                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5161                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5162                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5163                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5164                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5165                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5166                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5167                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5168                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5169                 </links>
5170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5171                         <actions>
5172                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5173                         </actions>
5174                 </permacrud>
5175         </class>
5176         <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">
5177                 <oils_persist:source_definition><![CDATA[
5178                 SELECT
5179                         ahr.*,
5180                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5181                                 copy_location_order_position,
5182                         CASE WHEN au.alias IS NOT NULL THEN
5183                                 au.alias
5184                         ELSE
5185                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5186                                         COALESCE(au.family_name, ''),
5187                                         COALESCE(au.suffix, ''),
5188                                         ', ',
5189                                         COALESCE(au.prefix, ''),
5190                                         COALESCE(au.first_given_name, ''),
5191                                         COALESCE(au.second_given_name, '')
5192                                 ], ' '), E'\\s+,', ',')
5193                         END AS usr_display_name,
5194                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5195                                 AS call_number_label,
5196                         siss.label AS issuance_label,
5197                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5198                         ahcm_1.copy_count AS potential_copies
5199                 FROM action.hold_request ahr
5200                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5201                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5202                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5203                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5204                 JOIN actor.usr au ON (au.id = ahr.usr)
5205                 JOIN (
5206                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5207                         FROM asset.copy_location
5208                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5209                 LEFT JOIN actor.usr_standing_penalty ausp 
5210                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5211                 LEFT JOIN config.standing_penalty csp
5212                         ON (
5213                                 csp.id = ausp.standing_penalty AND 
5214                                 csp.block_list LIKE '%CAPTURE%' AND (
5215                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5216                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5217                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5218                                         )
5219                                 )
5220                         )
5221                 JOIN (
5222                         SELECT COUNT(target_copy) AS copy_count, hold
5223                         FROM action.hold_copy_map
5224                         GROUP BY 2
5225                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5226                 LEFT JOIN serial.issuance siss
5227                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5228                 LEFT JOIN asset.copy_location_order acplo
5229                         ON (acp.location = acplo.location AND
5230                                 acp.circ_lib = acplo.org)
5231                 WHERE
5232                         ahr.capture_time IS NULL AND
5233                         ahr.cancel_time IS NULL AND
5234                         csp.id IS NULL AND
5235                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5236                 ]]></oils_persist:source_definition>
5237                 <fields oils_persist:primary="id">
5238                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5239                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5240                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5241                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5242                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5243                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5244                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5245                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5246                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5247                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5248                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5249                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5250                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5251                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5252                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5253                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5254                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5255                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5256                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5257                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5258                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5259                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5260                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5261                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5262                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5263                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5264                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5265                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5269                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5270                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5271                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5272                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5273                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5274                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5275                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5276                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5277                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5278                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5279                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5280                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5281                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5282                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5283                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5284                 </fields>
5285                 <links>
5286                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5287                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5288                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5289                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5290                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5291                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5292                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5293                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5294                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5295                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5296                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5297                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5298                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5299                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5300                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5301                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5302                 </links>
5303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5304                         <actions>
5305                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5306                         </actions>
5307                 </permacrud>
5308         </class>
5309         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5310                 <oils_persist:source_definition>
5311                         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)
5312                 </oils_persist:source_definition>
5313                 <fields oils_persist:primary="id">
5314                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5315                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5316                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5317                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5318                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5319                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5321                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5322                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5323                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5324                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5325                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5326                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5327                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5328                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5329                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5330                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5331                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5332                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5333                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5334                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5335                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5336                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5337                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5338                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5339                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5340                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5341                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5342                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5343                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5344                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5345                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5346                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5347                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5348                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5349                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5350                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5351                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5352                 </fields>
5353                 <links>
5354                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5355                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5356                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5357                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5358                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5359                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5360                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5361                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5362                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5363                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5364                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5365                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5366                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5367                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5368                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5369                 </links>
5370         </class>
5371
5372         <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">
5373                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5374                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5375                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5376                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5377                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5378                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5379                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5380                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5381                 </fields>
5382                 <links>
5383                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5384                 </links>
5385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5386                         <actions>
5387                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5388                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5389                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5390                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5391                         </actions>
5392                 </permacrud>
5393         </class>
5394         <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">
5395                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5396                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5397                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5398                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5399                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5400                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5401                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5402                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5403                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5404                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5405                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5406                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5407                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5408                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5409                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5410                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5411                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5412                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5413                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5414                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5415                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5416                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5417                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5418                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5419                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5420                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5421                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5422                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5423                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5424                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5425                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5426                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5427                 </fields>
5428                 <links>
5429                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5430                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5431                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5432                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5433                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5434                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5435                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5436                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5437                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5438                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5439                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5440                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5441                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5442                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5443                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5444                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5445                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5446                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5447                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5448                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5449                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5450                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5451                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5452                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5453                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5454                 </links>
5455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5456             <actions>
5457                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5458                 <retrieve />
5459                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5460                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5461             </actions>
5462         </permacrud>
5463         </class>
5464         <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">
5465                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5466                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5467                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5468                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5469                 </fields>
5470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5471                         <actions>
5472                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5473                                 <retrieve/>
5474                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5475                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5476                         </actions>
5477                 </permacrud>
5478         </class>
5479         <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">
5480                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5481                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5482                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5483                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5484                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5485                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5486                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5487                 </fields>
5488                 <links>
5489                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5490                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5491                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5492                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5493                 </links>
5494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5495                         <actions>
5496                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5497                                 <retrieve/>
5498                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5499                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5500                         </actions>
5501                 </permacrud>
5502         </class>
5503         <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">
5504                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5505                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5506                         <field name="btype" reporter:datatype="text"/>
5507                         <field name="id" reporter:datatype="id" />
5508                         <field name="name"  reporter:datatype="text"/>
5509                         <field name="description" reporter:datatype="text"/>
5510                         <field name="owner" reporter:datatype="link"/>
5511                         <field name="pub" reporter:datatype="bool"/>
5512                         <field name="create_time" reporter:datatype="timestamp" />
5513                 </fields>
5514                 <links>
5515                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5516                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5517                 </links>
5518         </class>
5519         <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">
5520                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5521                         <field name="id" reporter:datatype="id" />
5522                         <field name="bucket" reporter:datatype="link"/>
5523                         <field name="note" reporter:datatype="text" />
5524                 </fields>
5525                 <links>
5526                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5527                 </links>
5528         </class>
5529         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5530                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5531                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5532                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5533                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5534                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5535                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5536                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5537                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5538                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5539                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5540                 </fields>
5541                 <links>
5542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5543                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5544                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5545                 </links>
5546         </class>
5547         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5548                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5549                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5550                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5551                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5552                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5553                 </fields>
5554                 <links>
5555                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5556                 </links>
5557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5558                         <actions>
5559                                 <retrieve permission="VIEW_USER">
5560                                         <context link="usr" field="home_ou" />
5561                                 </retrieve>
5562                         </actions>
5563                 </permacrud>
5564         </class>
5565     <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">
5566         <fields oils_persist:primary="field">
5567             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5568             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5569             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5570         </fields>
5571         <links/>
5572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5573             <actions>
5574                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5575                 <retrieve />
5576                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5577                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5578             </actions>
5579         </permacrud>
5580     </class>
5581         <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">
5582                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5583                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5584                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5585                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5587                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5588                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5589                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5590                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5591                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5592                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5593                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5594                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5595                 </fields>
5596                 <links>
5597                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5598                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5599                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5600                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5601                 </links>
5602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5603             <actions>
5604                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5605                 <retrieve />
5606                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5607                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5608             </actions>
5609         </permacrud>
5610         </class>
5611         <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">
5612                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5613                         <field name="field" reporter:datatype="link"/>
5614                         <field name="id" reporter:datatype="id" />
5615                         <field name="source" reporter:datatype="link"/>
5616                         <field name="value"  reporter:datatype="text"/>
5617                 </fields>
5618                 <links>
5619                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5620                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5621                 </links>
5622         </class>
5623         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5624                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5625                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5626                         <field name="btype" reporter:datatype="text"/>
5627                         <field name="id" reporter:datatype="id" />
5628                         <field name="name"  reporter:datatype="text"/>
5629                         <field name="description" reporter:datatype="text"/>
5630                         <field name="owner" reporter:datatype="link"/>
5631                         <field name="pub" reporter:datatype="bool"/>
5632                         <field name="create_time" reporter:datatype="timestamp" />
5633                 </fields>
5634                 <links>
5635                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5636                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5637                 </links>
5638         </class>
5639         <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">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5641                         <field name="id" reporter:datatype="id" />
5642                         <field name="bucket" reporter:datatype="link"/>
5643                         <field name="note" reporter:datatype="text" />
5644                 </fields>
5645                 <links>
5646                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5647                 </links>
5648         </class>
5649         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5650                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5651                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5652                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5653                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5654                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5655                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5656                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5657                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5658                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5659                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5660                 </fields>
5661                 <links>
5662                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5663                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5664                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5665                 </links>
5666         </class>
5667         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5668                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5669                         <field name="id" reporter:datatype="id" />
5670                         <field name="ind1" />
5671                         <field name="ind2" />
5672                         <field name="record" />
5673                         <field name="subfield" />
5674                         <field name="tag" />
5675                         <field name="value" />
5676                 </fields>
5677                 <links>
5678                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5679                 </links>
5680         </class>
5681         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
5682                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5683                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5684                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5685                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5686                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5687                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5688                 </fields>
5689                 <links>
5690                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5691                 </links>
5692         </class>
5693         <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">
5694                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5695                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5696                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5697                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5698                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5699                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5700                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5701                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5702                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5703                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5704                 </fields>
5705                 <links>
5706                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5707                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5708                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5709                 </links>
5710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5711             <actions>
5712                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5713                 <retrieve/>
5714                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5715                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5716             </actions>
5717         </permacrud>
5718         </class>
5719         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5720                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5721                         <field name="create_date" reporter:datatype="timestamp"/>
5722                         <field name="creator" reporter:datatype="link"/>
5723                         <field name="edit_date" reporter:datatype="timestamp"/>
5724                         <field name="editor" reporter:datatype="link"/>
5725                         <field name="id" reporter:datatype="id" />
5726                         <field name="pub" reporter:datatype="bool"/>
5727                         <field name="record" reporter:datatype="link"/>
5728                         <field name="value"  reporter:datatype="text"/>
5729                 </fields>
5730                 <links>
5731                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5732                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5733                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5734                 </links>
5735         </class>
5736         <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">
5737                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5738                         <field name="balance_owed" reporter:datatype="money" />
5739                         <field name="total_owed" reporter:datatype="money" />
5740                         <field name="total_paid" reporter:datatype="money" />
5741                         <field name="usr" reporter:datatype="link"/>
5742                 </fields>
5743                 <links>
5744                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5745                 </links>
5746         </class>
5747         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5748                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5749                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5750                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5751                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5752                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5753                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5754                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5755                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5756                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5757                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5758                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5759                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5760                 </fields>
5761                 <links>
5762                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5763                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5764                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5765                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5766                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5767                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5768                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5769                 </links>
5770         </class>
5771         <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">
5772                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5773                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5774                         <field name="quality" reporter:datatype="int" />
5775                         <field name="source" reporter:datatype="text"/>
5776                         <field name="transcendant" reporter:datatype="bool"/>
5777                         <field name="can_have_copies" reporter:datatype="bool"/>
5778                 </fields>
5779                 <links/>
5780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5781             <actions>
5782                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5783                 <retrieve/>
5784                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5785                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5786             </actions>
5787         </permacrud>
5788         </class>
5789         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5790                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5791                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5792                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5793                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5794                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5795                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5796                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5797                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5799                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5800                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5801                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5802                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5803                 </fields>
5804                 <links>
5805                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5806                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5807                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5808                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5809                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5810                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5811                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5812                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5813                 </links>
5814         </class>
5815         <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">
5816                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5817                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5818                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5819                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5820                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5821                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5822                 </fields>
5823                 <links>
5824                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5825                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5826                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5827                 </links>
5828         </class>
5829         <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">
5830                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5831                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5832                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5833                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5834                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5835                 </fields>
5836                 <links>
5837                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5838                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5839                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5840                 </links>
5841         </class>
5842         <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">
5843                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5844                         <field name="bucket" reporter:datatype="link"/>
5845                         <field name="id" reporter:datatype="id" />
5846                         <field name="target_user" reporter:datatype="link"/>
5847                         <field name="create_time" reporter:datatype="timestamp" />
5848                         <field name="pos" reporter:datatype="int" />
5849                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5850                 </fields>
5851                 <links>
5852                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5853                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5854             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5855                 </links>
5856         </class>
5857         <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">
5858                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5859                         <field name="id" reporter:datatype="id" />
5860                         <field name="item" reporter:datatype="link"/>
5861                         <field name="note" reporter:datatype="text" />
5862                 </fields>
5863                 <links>
5864                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5865                 </links>
5866         </class>
5867         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5868                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5869                         <field name="balance_owed" reporter:datatype="money" />
5870                         <field name="total_owed" reporter:datatype="money" />
5871                         <field name="total_paid" reporter:datatype="money" />
5872                         <field name="usr" reporter:datatype="link"/>
5873                 </fields>
5874                 <links>
5875                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5876                 </links>
5877         </class>
5878         <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">
5879                 <fields oils_persist:primary="code" oils_persist:sequence="">
5880                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5881                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5882                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5883                 </fields>
5884                 <links/>
5885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5886             <actions>
5887                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5888                 <retrieve/>
5889                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5890                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5891             </actions>
5892         </permacrud>
5893         </class>
5894         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5896                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5897                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5898                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5899                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5900                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5901                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5902                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5903                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5904                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5905                 </fields>
5906                 <links>
5907                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5908                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5909                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5910                 </links>
5911         </class>
5912         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5913                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5914                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5915                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5916                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5917                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5918                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5919                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5920                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5921                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5922                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5923                 </fields>
5924                 <links>
5925                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5926                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5927                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5928                 </links>
5929         </class>
5930         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5931                 <fields oils_persist:primary="id" oils_persist:sequence="">
5932                         <field name="checkin_lib" reporter:datatype="link"/>
5933                         <field name="checkin_staff" reporter:datatype="link"/>
5934                         <field name="checkin_time" reporter:datatype="timestamp"/>
5935                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5936                         <field name="circ_staff" reporter:datatype="link"/>
5937                         <field name="desk_renewal" reporter:datatype="bool"/>
5938                         <field name="due_date" reporter:datatype="timestamp"/>
5939                         <field name="duration" reporter:datatype="interval"/>
5940                         <field name="duration_rule" reporter:datatype="link"/>
5941                         <field name="fine_interval" reporter:datatype="interval"/>
5942                         <field name="id" reporter:datatype="id" />
5943                         <field name="max_fine" reporter:datatype="money" />
5944                         <field name="max_fine_rule" reporter:datatype="link"/>
5945                         <field name="opac_renewal" reporter:datatype="bool"/>
5946                         <field name="phone_renewal" reporter:datatype="bool"/>
5947                         <field name="recurring_fine" reporter:datatype="money" />
5948                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5949                         <field name="renewal_remaining" reporter:datatype="int" />
5950             <field name="grace_period" reporter:datatype="interval" />
5951                         <field name="stop_fines" reporter:datatype="text"/>
5952                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5953                         <field name="target_copy" reporter:datatype="link"/>
5954                         <field name="usr" reporter:datatype="link"/>
5955                         <field name="xact_finish" reporter:datatype="timestamp" />
5956                         <field name="xact_start" reporter:datatype="timestamp" />
5957                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5958                 </fields>
5959                 <links>
5960                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5961                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5962                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5963                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5964                 </links>
5965         </class>
5966         <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">
5967                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5968                         <field name="field" reporter:datatype="link"/>
5969                         <field name="id" reporter:datatype="id" />
5970                         <field name="source" reporter:datatype="link"/>
5971                         <field name="value" reporter:datatype="text"/>
5972                 </fields>
5973                 <links>
5974                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5975                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5976                 </links>
5977         </class>
5978         <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">
5979                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5980                         <field name="high" reporter:datatype="money" />
5981                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5982                         <field name="low" reporter:datatype="money" />
5983                         <field name="name" reporter:datatype="text"/>
5984                         <field name="normal" reporter:datatype="money" />
5985                         <field name="recurrence_interval" reporter:datatype="interval"/>
5986             <field name="grace_period" reporter:datatype="interval" />
5987                 </fields>
5988                 <links/>
5989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5990             <actions>
5991                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5992                 <retrieve/>
5993                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5994                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5995             </actions>
5996         </permacrud>
5997         </class>
5998         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5999                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6000                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6001                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6002                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6003                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6004                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6005                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6006                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6007                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6008                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6009                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6010                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6011                 </fields>
6012                 <links>
6013                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6014                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6015                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6016                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6017                 </links>
6018         </class>
6019         <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">
6020                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6021                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6022                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6023                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6024                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6025                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6026                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6027                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6028                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6029                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6030                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6031                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6032                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6033                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6034                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6035                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6036                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6037                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6038                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6039                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6040                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6041                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6042                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6043                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6044                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6045                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6046                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6047                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6048                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6049                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6050                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6051                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6052                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6053                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6054                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6055                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6056                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6057                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6058                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6059                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6060                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6061                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6062                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6063                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6064                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6065                 </fields>
6066                 <links>
6067                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6068                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6069                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6070                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6071                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6072                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6073                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6074                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6075                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6076                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6077                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6078                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6079                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6080                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6081                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6082                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6083                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6084                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6085                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6086                 </links>
6087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6088             <actions>
6089                 <create permission="CREATE_COPY">
6090                     <context link="call_number" field="owning_lib"/>
6091                 </create>
6092                 <retrieve/>
6093                 <update permission="UPDATE_COPY">
6094                     <context link="call_number" field="owning_lib"/>
6095                 </update>
6096                 <delete permission="DELETE_COPY">
6097                     <context link="call_number" field="owning_lib"/>
6098                 </delete>
6099             </actions>
6100         </permacrud>
6101         </class>
6102
6103         <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">
6104                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6105                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6106                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6107                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6108                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6109                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6110                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6111                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6112                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6113                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6114                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6115                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6116                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6117                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6118                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6119                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6120                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6121                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6122                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6123                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6124                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6125                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6126                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6127                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6128                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6129                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6130                 </fields>
6131                 <links>
6132                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6133                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6134                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6135                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6136                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6137                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6138                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6139                 </links>
6140                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6141                         <actions>
6142                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6143                                 <retrieve />
6144                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6145                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6146                         </actions>
6147                 </permacrud>
6148         </class>
6149
6150         <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">
6151                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6152                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6153                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6154                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6155                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6156                 </fields>
6157                 <links/>
6158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6159             <actions>
6160                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6161                 <retrieve/>
6162                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6163                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6164             </actions>
6165         </permacrud>
6166         </class>
6167         <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">
6168                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6169                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6170                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6171                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6172                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6173                 </fields>
6174                 <links/>
6175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6176             <actions>
6177                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6178                 <retrieve/>
6179                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6180                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6181             </actions>
6182         </permacrud>
6183         </class>
6184         <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">
6185                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6186                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6187                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6188                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6189                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6190                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6191                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6192                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6193                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6194                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6195                 </fields>
6196                 <links>
6197                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6198                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6199                 </links>
6200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6201             <actions>
6202                 <create permission="CREATE_PERM" global_required="true"/>
6203                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6204                 <update permission="UPDATE_PERM" global_required="true"/>
6205                 <delete permission="DELETE_PERM" global_required="true"/>
6206             </actions>
6207         </permacrud>
6208         </class>
6209         <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">
6210                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6211                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6212                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6213                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6214                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6215                 </fields>
6216                 <links>
6217                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6218                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6219                 </links>
6220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6221             <actions>
6222                 <create permission="ADMIN_SURVEY">
6223                     <context link="question" jump="survey" field="owner"/>
6224                 </create>
6225                 <retrieve/>
6226                 <update permission="ADMIN_SURVEY">
6227                     <context link="question" jump="survey" field="owner"/>
6228                 </update>
6229                 <delete permission="ADMIN_SURVEY">
6230                     <context link="question" jump="survey" field="owner"/>
6231                 </delete>
6232             </actions>
6233         </permacrud>
6234         </class>
6235         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6236                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6237                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6238                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6239                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6240                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6241                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6242                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6243                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6244                 </fields>
6245                 <links>
6246                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6247                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6248                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6249                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6250                 </links>
6251         </class>
6252         <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">
6253                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6254                         <field name="balance_owed" reporter:datatype="money" />
6255                         <field name="total_owed" reporter:datatype="money" />
6256                         <field name="total_paid" reporter:datatype="money" />
6257                         <field name="usr" reporter:datatype="link"/>
6258                 </fields>
6259                 <links>
6260                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6261                 </links>
6262         </class>
6263         <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">
6264                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6265                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6266                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6267                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6268                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6269                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6270                 </fields>
6271                 <links>
6272                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6273                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6274                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6275                 </links>
6276         </class>
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6279                         <field name="field" reporter:datatype="link"/>
6280                         <field name="id" reporter:datatype="id" />
6281                         <field name="source" reporter:datatype="link"/>
6282                         <field name="value" reporter:datatype="text"/>
6283                 </fields>
6284                 <links>
6285                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6286                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6287                 </links>
6288         </class>
6289         <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">
6290                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6291                         <field name="field" reporter:datatype="link"/>
6292                         <field name="id" reporter:datatype="id" />
6293                         <field name="source" reporter:datatype="link"/>
6294                         <field name="value" reporter:datatype="text"/>
6295                 </fields>
6296                 <links>
6297                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6298                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6299                 </links>
6300         </class>
6301         <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">
6302                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6303                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6304                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6305                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6306                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6307                 </fields>
6308                 <links>
6309                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6310                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6311                 </links>
6312         </class>
6313         <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">
6314                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6315                         <field name="depth" reporter:datatype="int" />
6316                         <field name="grantable" reporter:datatype="bool"/>
6317                         <field name="grp" reporter:datatype="link"/>
6318                         <field name="id" reporter:datatype="id" />
6319                         <field name="perm" reporter:datatype="link"/>
6320                 </fields>
6321                 <links>
6322                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6323                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6324                 </links>
6325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6326             <actions>
6327                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6328                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6329                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6330                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6331             </actions>
6332         </permacrud>
6333         </class>
6334         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6335                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6336                         <field name="items" oils_persist:virtual="true" />
6337                         <field name="btype" reporter:datatype="text"/>
6338                         <field name="id" reporter:datatype="id" />
6339                         <field name="name" reporter:datatype="text"/>
6340                         <field name="description" reporter:datatype="text"/>
6341                         <field name="owner" reporter:datatype="link"/>
6342                         <field name="pub" reporter:datatype="bool"/>
6343                         <field name="create_time" reporter:datatype="timestamp" />
6344                 </fields>
6345                 <links>
6346                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6347                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6348                 </links>
6349         </class>
6350         <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">
6351                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6352                         <field name="id" reporter:datatype="id" />
6353                         <field name="bucket" reporter:datatype="link"/>
6354                         <field name="note" reporter:datatype="text" />
6355                 </fields>
6356                 <links>
6357                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6358                 </links>
6359         </class>
6360         <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">
6361                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6362                         <field name="id" reporter:datatype="int" />
6363                         <field name="usr" reporter:datatype="link"/>
6364                         <field name="work_ou" reporter:datatype="link"/>
6365                 </fields>
6366                 <links>
6367                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6368                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6369                 </links>
6370         </class>
6371         <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">
6372                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6373                         <field name="depth" reporter:datatype="int"/>
6374                         <field name="grantable" reporter:datatype="bool"/>
6375                         <field name="id" reporter:datatype="id" />
6376                         <field name="perm" reporter:datatype="link"/>
6377                         <field name="usr" reporter:datatype="link"/>
6378                 </fields>
6379                 <links>
6380                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6381                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6382                 </links>
6383         </class>
6384         <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">
6385                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6386                         <field name="object_id" reporter:datatype="text"/>
6387                         <field name="grantable" reporter:datatype="bool"/>
6388                         <field name="id" reporter:datatype="id" />
6389                         <field name="perm" reporter:datatype="link"/>
6390                         <field name="usr" reporter:datatype="link"/>
6391                         <field name="object_type" reporter:datatype="text"/>
6392                 </fields>
6393                 <links>
6394                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6395                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6396                 </links>
6397         </class>
6398         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6399                 <fields oils_persist:primary="id" oils_persist:sequence="">
6400                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6401                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6402                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6403                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6404                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6405                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6406                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6407                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6408                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6409                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6410                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6411                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6412                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6413                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6414                 </fields>
6415                 <links>
6416                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6417                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6418                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6419                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6420                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6421                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6422                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6423                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6424                 </links>
6425         </class>
6426         <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">
6427                 <fields oils_persist:primary="id" oils_persist:sequence="">
6428                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6429                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6430                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6431                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6432                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6433                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6434                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6435                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6436                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6437                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6438                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6439                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6440                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6441                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6442                 </fields>
6443                 <links>
6444                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6445                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6446                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6447                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6448                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6449                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6450                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6451                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6452                 </links>
6453         </class>
6454         <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">
6455                 <fields oils_persist:primary="id" oils_persist:sequence="">
6456                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6457                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6458                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6459                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6460                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6461                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6462                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6463                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6464                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6465                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6466                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6467                 </fields>
6468                 <links>
6469                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6470                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6471                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6472                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6473                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6474                 </links>
6475         </class>
6476         <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">
6477                 <fields oils_persist:primary="id" oils_persist:sequence="">
6478                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6479                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6480                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6481                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6482                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6483                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6484                         <field reporter:label="Accepting User" name="accepting_usr" />
6485                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6486                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6487                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6488                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6489                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6490                 </fields>
6491                 <links>
6492                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6493                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6494                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6495                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6496                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6497                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6498                 </links>
6499         </class>
6500         <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">
6501                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6502                         <field name="bucket" reporter:datatype="link"/>
6503                         <field name="id" reporter:datatype="id" />
6504                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6505                         <field name="create_time" reporter:datatype="timestamp" />
6506                         <field name="pos" reporter:datatype="int" />
6507                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6508                 </fields>
6509                 <links>
6510                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6511                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6512             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6513                 </links>
6514         </class>
6515         <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">
6516                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6517                         <field name="id" reporter:datatype="id" />
6518                         <field name="item" reporter:datatype="link"/>
6519                         <field name="note" reporter:datatype="text" />
6520                 </fields>
6521                 <links>
6522                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6523                 </links>
6524         </class>
6525         <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">
6526                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6527                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6528                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6529                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6530                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6531                 </fields>
6532                 <links>
6533                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6534                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6535                 </links>
6536         </class>
6537     <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">
6538         <fields oils_persist:primary="field">
6539             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6540             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6541             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6542         </fields>
6543         <links/>
6544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6545             <actions>
6546                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6547                 <retrieve />
6548                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6549                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6550             </actions>
6551         </permacrud>
6552     </class>
6553         <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">
6554                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6555                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6556                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6557                 </fields>
6558                 <links/>
6559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6560             <actions>
6561                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6562                 <retrieve/>
6563                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6564                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6565             </actions>
6566         </permacrud>
6567         </class>
6568
6569
6570         <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">
6571                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6572                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6573                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6574                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6575                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6576                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6577                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6578                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6579                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6580                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6581                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6582                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6583                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6584                 </fields>
6585                 <links>
6586                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6587                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6588                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6589                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6590                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6591                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6592                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6593                 </links>
6594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6595             <actions>
6596                 <create permission="TRANSIT_COPY">
6597                     <context link="target_copy" field="owner"/>
6598                 </create>
6599                 <retrieve/>
6600                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6601                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6602             </actions>
6603         </permacrud>
6604         </class>
6605         <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">
6606                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6607                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6608                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6609                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6610                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6611                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6612                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6613                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6614                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6615                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6616                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6617                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6618                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6619                 </fields>
6620                 <links>
6621                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6622                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6623                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6624                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6625                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6626                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6627                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6628                 </links>
6629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6630             <actions>
6631                 <create permission="TRANSIT_COPY" context_field="owner">
6632                     <context link="target_copy" field="circ_lib"/>
6633                 </create>
6634                 <retrieve/>
6635                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6636                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6637             </actions>
6638         </permacrud>
6639         </class>
6640         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6641                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6642                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6643                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6644                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6645                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6646                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6647                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6648                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6649                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6650                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6651                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6652                 </fields>
6653                 <links>
6654                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6655                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6656                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6657                 </links>
6658         </class>
6659         <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">
6660                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6661                         <field name="grp" />
6662                         <field name="id" reporter:datatype="id" />
6663                         <field name="usr" />
6664                 </fields>
6665                 <links>
6666                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6667                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6668                 </links>
6669         </class>
6670         <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">
6671                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6672                         <field name="id" reporter:datatype="id" />
6673                         <field name="fq_field" reporter:datatype="text"/>
6674                         <field name="identity_value" reporter:datatype="text"/>
6675                         <field name="translation" reporter:datatype="text"/>
6676                         <field name="string" reporter:datatype="text"/>
6677                 </fields>
6678                 <links>
6679                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6680                 </links>
6681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6682             <actions>
6683                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6684                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6685                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6686                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6687             </actions>
6688         </permacrud>
6689         </class>
6690         <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">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6692                         <field name="id" reporter:datatype="id" />
6693                         <field name="fm_class" reporter:datatype="text"/>
6694                         <field name="field" reporter:datatype="text"/>
6695                         <field name="owner" reporter:datatype="org_unit"/>
6696                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6697                 </fields>
6698                 <links>
6699                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6700                 </links>
6701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6702             <actions>
6703                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6704                 <retrieve/>
6705                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6706                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6707             </actions>
6708         </permacrud>
6709         </class>
6710         <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">
6711                 <fields oils_persist:primary="code">
6712                         <field name="code" reporter:datatype="id" />
6713                         <field name="marc_code" reporter:datatype="text"/>
6714                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6715                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6716                 </fields>
6717                 <links/>
6718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6719             <actions>
6720                 <create permission="CREATE_LOCALE" global_required="true"/>
6721                 <retrieve/>
6722                 <update permission="UPDATE_LOCALE" global_required="true"/>
6723                 <delete permission="DELETE_LOCALE" global_required="true"/>
6724             </actions>
6725         </permacrud>
6726         </class>
6727         <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">
6728                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6729                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6730                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6731                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6732             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6733                 </fields>
6734                 <links>
6735                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6736                 </links>
6737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6738             <actions>
6739                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6740                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6741                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6742                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6743             </actions>
6744         </permacrud>
6745         </class>
6746
6747         <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">
6748                 <fields oils_persist:primary="id">
6749                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6750                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6751                 </fields>
6752                 <links/>
6753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6754             <actions>
6755                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6756                 <retrieve/>
6757                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6758                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6759             </actions>
6760         </permacrud>
6761         </class>
6762
6763         <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">
6764                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6765                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6766                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6767                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6768                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6769                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6770                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6771                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6772                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6773                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6774                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6775                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6776                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6777                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6778                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6779                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6780                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6781                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6782                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6783                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6784                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6785                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6786                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6787                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6788                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6789                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6790                 </fields>
6791                 <links>
6792                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6793                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6794                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6795                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6796                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6797                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6798                 </links>
6799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6800             <actions>
6801                 <create permission="user_request.create">
6802                     <context link="usr" field="home_ou"/>
6803                                 </create>
6804                 <retrieve permission="user_request.view">
6805                     <context link="usr" field="home_ou"/>
6806                                 </retrieve>
6807                 <update permission="user_request.update">
6808                     <context link="usr" field="home_ou"/>
6809                                 </update>
6810                 <delete permission="user_request.delete">
6811                     <context link="usr" field="home_ou"/>
6812                                 </delete>
6813             </actions>
6814         </permacrud>
6815         </class>
6816
6817         <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">
6818                 <fields oils_persist:primary="code">
6819                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6820                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6821                 </fields>
6822                 <links/>
6823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6824             <actions>
6825                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6826                 <retrieve/>
6827                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6828                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6829             </actions>
6830         </permacrud>
6831         </class>
6832
6833         <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">
6834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6835                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6836                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6837                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6838                         <field reporter:label="Ratio" name="ratio" />
6839                 </fields>
6840                 <links>
6841                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6842                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6843                 </links>
6844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6845                         <actions>
6846                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6847                                 <retrieve/>
6848                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6849                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6850                         </actions>
6851                 </permacrud>
6852         </class>
6853
6854         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6856                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6857                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6858                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6859                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6860                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6861                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6862                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6863                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6864                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6865                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6866                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6867                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6868                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6869                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6870                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6871                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6872                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
6873                 </fields>
6874                 <links>
6875                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6876                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6877             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6878             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6879             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6880                 </links>
6881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6882             <actions>
6883                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6884                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6885                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6886                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6887             </actions>
6888         </permacrud>
6889         </class>
6890
6891         <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">
6892                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6893                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6894                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6895                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6896                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6897                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6898                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6899                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6900                 </fields>
6901                 <links>
6902                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6903                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6904                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6905                 </links>
6906         </class>
6907
6908         <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">
6909                 <fields oils_persist:primary="code">
6910                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6911                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6912                 </fields>
6913                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6914             <actions>
6915                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6916                 <retrieve/>
6917                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6918                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6919             </actions>
6920                 </permacrud>
6921         </class>
6922
6923         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6925                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6926                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6927                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6928                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6929                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6930                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6931                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6932                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6933                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6934                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6935                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6936                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6937                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6938                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6939                 </fields>
6940                 <links>
6941                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6942                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6943                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6944                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6945                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6946                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6947                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6948                 </links>
6949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6950             <actions>
6951                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6952                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6953                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6954                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6955             </actions>
6956         </permacrud>
6957         </class>
6958
6959         <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">
6960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6961                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6962                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6963                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6964                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6965                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6966                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6967                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6968                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6969                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6970                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6971                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6972                 </fields>
6973                 <links>
6974                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6975                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6976                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6977                 </links>
6978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6979             <actions>
6980                 <create   permission="ADMIN_INVOICE">
6981                                         <context link="invoice" field="receiver"/>
6982                                 </create>
6983                 <retrieve permission="ADMIN_INVOICE">
6984                                         <context link="invoice" field="receiver"/>
6985                                 </retrieve>
6986                 <update   permission="ADMIN_INVOICE">
6987                                         <context link="invoice" field="receiver"/>
6988                                 </update>
6989                                 <delete   permission="ADMIN_INVOICE">
6990                                         <context link="invoice" field="receiver"/>
6991                                 </delete>
6992             </actions>
6993         </permacrud>
6994         </class>
6995
6996         <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">
6997                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6998                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6999                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7000                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7001                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7002                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7003                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7004                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7005                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7006                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7007                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7008                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7009                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7010                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7011                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7012                 </fields>
7013                 <links>
7014                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7015                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7016                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7017                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7018                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7019                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7020                 </links>
7021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7022             <actions>
7023                 <create   permission="ADMIN_INVOICE">
7024                                         <context link="invoice" field="receiver"/>
7025                                 </create>
7026                 <retrieve permission="ADMIN_INVOICE">
7027                                         <context link="invoice" field="receiver"/>
7028                                 </retrieve>
7029                 <update   permission="ADMIN_INVOICE">
7030                                         <context link="invoice" field="receiver"/>
7031                                 </update>
7032                                 <delete   permission="ADMIN_INVOICE">
7033                                         <context link="invoice" field="receiver"/>
7034                                 </delete>
7035             </actions>
7036         </permacrud>
7037         </class>
7038
7039         <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">
7040                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7041                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7042                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7043                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7044                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7045                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7046                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7047                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7048                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7049                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7050                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7051                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7052                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7053                 </fields>
7054                 <links>
7055                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7056                 </links>
7057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7058             <actions>
7059                 <create permission="ADMIN_PROVIDER">
7060                     <context link="provider" field="owner"/>
7061                 </create>
7062                 <retrieve permission="ADMIN_PROVIDER">
7063                     <context link="provider" field="owner"/>
7064                 </retrieve>
7065                 <update permission="ADMIN_PROVIDER">
7066                     <context link="provider" field="owner"/>
7067                 </update>
7068                 <delete permission="ADMIN_PROVIDER">
7069                     <context link="provider" field="owner"/>
7070                 </delete>
7071             </actions>
7072         </permacrud>
7073         </class>
7074
7075         <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">
7076                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7077                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7078                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7079                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7080                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7081                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7082                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7083         </fields>
7084                 <links>
7085                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7086                 </links>
7087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7088             <actions>
7089                 <create permission="ADMIN_PROVIDER">
7090                     <context link="provider" field="owner"/>
7091                 </create>
7092                 <retrieve permission="ADMIN_PROVIDER">
7093                     <context link="provider" field="owner"/>
7094                 </retrieve>
7095                 <update permission="ADMIN_PROVIDER">
7096                     <context link="provider" field="owner"/>
7097                 </update>
7098                 <delete permission="ADMIN_PROVIDER">
7099                     <context link="provider" field="owner"/>
7100                 </delete>
7101             </actions>
7102         </permacrud>
7103     </class>
7104         <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">
7105                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7106                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7107                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7108                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7109                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7110                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7111                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7112                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7113                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7114                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7115                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7116                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7117                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7118                 </fields>
7119                 <links>
7120                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7121                 </links>
7122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7123             <actions>
7124                 <create permission="ADMIN_PROVIDER">
7125                     <context link="contact" jump='provider' field="owner"/>
7126                 </create>
7127                 <retrieve permission="ADMIN_PROVIDER">
7128                     <context link="contact" jump='provider' field="owner"/>
7129                 </retrieve>
7130                 <update permission="ADMIN_PROVIDER">
7131                     <context link="contact" jump='provider' field="owner"/>
7132                 </update>
7133                 <delete permission="ADMIN_PROVIDER">
7134                     <context link="contact" jump='provider' field="owner"/>
7135                 </delete>
7136             </actions>
7137         </permacrud>
7138         </class>
7139
7140         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7141                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7142                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7143                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7144                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7145                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7146                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7147                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7148                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7149                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7150                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7151                 </fields>
7152                 <links>
7153                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7154                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7155                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7156                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7157                 </links>
7158         </class>
7159
7160         <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">
7161                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7162                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7163                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7164                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7165                 </fields>
7166                 <links>
7167             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7168                 </links>
7169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7170                         <actions>
7171                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7172                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7173                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7174                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7175                         </actions>
7176                 </permacrud>
7177         </class>
7178
7179         <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">
7180                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7181                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7182                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7183                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7184                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7185                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7186                 </fields>
7187                 <links>
7188                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7189                 </links>
7190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7191                         <actions>
7192                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7193                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7194                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7195                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7196                         </actions>
7197                 </permacrud>
7198         </class>
7199
7200         <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">
7201                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7202                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7203                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7204                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7205                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7206                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7207                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7208                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7211                 </fields>
7212                 <links>
7213                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7214                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7215             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7216             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7217                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7218                 </links>
7219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7220             <actions>
7221                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7222                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7223                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7224                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7225             </actions>
7226         </permacrud>
7227         </class>
7228
7229         <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">
7230                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7231                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7232                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7233                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7234                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7235                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7236                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7237                 </fields>
7238                 <links>
7239                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7240                 </links>
7241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7242                         <actions>
7243                                 <create permission="ADMIN_FUNDING_SOURCE">
7244                     <context link="funding_source" field="owner"/>
7245                 </create>
7246                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7247                     <context link="funding_source" field="owner"/>
7248                 </retrieve>
7249                                 <update permission="ADMIN_FUNDING_SOURCE">
7250                     <context link="funding_source" field="owner"/>
7251                 </update>
7252                                 <delete permission="ADMIN_FUNDING_SOURCE">
7253                     <context link="funding_source" field="owner"/>
7254                 </delete>
7255                         </actions>
7256                 </permacrud>
7257         </class>
7258
7259         <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">
7260                 <fields oils_persist:primary="id">
7261                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7262                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7263                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7264                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7265                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7266                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7267                 </fields>
7268                 <links>
7269                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7270                 </links>
7271         </class>
7272
7273         <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">
7274                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7275                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7276                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7277                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7278                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7279                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7280                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7281                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7282                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7283                 </fields>
7284                 <links>
7285                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7286                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7287                 </links>
7288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7289                         <actions>
7290                                 <create permission="ADMIN_ACQ_FUND">
7291                     <context link="fund" field="org"/>
7292                 </create>
7293                                 <retrieve permission="ADMIN_ACQ_FUND">
7294                     <context link="fund" field="org"/>
7295                 </retrieve>
7296                                 <update permission="ADMIN_ACQ_FUND">
7297                     <context link="fund" field="org"/>
7298                 </update>
7299                                 <delete permission="ADMIN_ACQ_FUND">
7300                     <context link="fund" field="org"/>
7301                 </delete>
7302                         </actions>
7303                 </permacrud>
7304         </class>
7305
7306         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7307                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7308                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7309                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7310                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7311                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7312                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7313                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7314                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7315                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7316                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7317                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7318                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7319                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7320                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7321                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7322                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7323                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7324                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7325                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7326                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7327                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7328                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7329                 </fields>
7330                 <links>
7331                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7332                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7333             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7334             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7335             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7336             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7337             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7338             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7339             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7340             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7341             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7342                 </links>
7343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7344             <actions>
7345                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7346                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7347                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7348                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7349             </actions>
7350         </permacrud>
7351         </class>
7352
7353         <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">
7354                 <fields oils_persist:primary="fund">
7355                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7356                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7357                 </fields>
7358                 <links>
7359                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7360                 </links>
7361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7362             <actions>
7363                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7364                                         <context link="fund" field="org" />
7365                 </retrieve>
7366             </actions>
7367         </permacrud>
7368         </class>
7369
7370         <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">
7371                 <fields oils_persist:primary="fund">
7372                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7373                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7374                 </fields>
7375                 <links>
7376                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7377                 </links>
7378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7379             <actions>
7380                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7381                                         <context link="fund" field="org" />
7382                 </retrieve>
7383             </actions>
7384         </permacrud>
7385         </class>
7386
7387         <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">
7388                 <fields oils_persist:primary="fund">
7389                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7390                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7391                 </fields>
7392                 <links>
7393                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7394                 </links>
7395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7396             <actions>
7397                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7398                                         <context link="fund" field="org" />
7399                 </retrieve>
7400             </actions>
7401         </permacrud>
7402         </class>
7403
7404         <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">
7405                 <fields oils_persist:primary="fund">
7406                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7407                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7408                 </fields>
7409                 <links>
7410                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7411                 </links>
7412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7413             <actions>
7414                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7415                                         <context link="fund" field="org" />
7416                 </retrieve>
7417             </actions>
7418         </permacrud>
7419         </class>
7420
7421         <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">
7422                 <fields oils_persist:primary="fund">
7423                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7424                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7425                 </fields>
7426                 <links>
7427                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7428                 </links>
7429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7430             <actions>
7431                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7432                                         <context link="fund" field="org" />
7433                 </retrieve>
7434             </actions>
7435         </permacrud>
7436         </class>
7437
7438    <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">
7439         <fields oils_persist:primary="fund">
7440             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7441             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7442         </fields>
7443         <links>
7444             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7445         </links>
7446     </class>
7447
7448    <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">
7449         <fields oils_persist:primary="fund">
7450             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7451             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7452         </fields>
7453         <links>
7454             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7455         </links>
7456     </class>
7457
7458    <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">
7459         <fields oils_persist:primary="fund">
7460             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7461             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7462         </fields>
7463         <links>
7464             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7465         </links>
7466     </class>
7467
7468    <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">
7469         <fields oils_persist:primary="fund">
7470             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7471             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7472         </fields>
7473         <links>
7474             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7475         </links>
7476     </class>
7477
7478    <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">
7479         <fields oils_persist:primary="fund">
7480             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7481             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7482         </fields>
7483         <links>
7484             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7485         </links>
7486     </class>
7487
7488         <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">
7489                 <fields oils_persist:primary="funding_source">
7490                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7491                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7492                 </fields>
7493                 <links>
7494                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7495                 </links>
7496         </class>
7497
7498         <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">
7499                 <fields oils_persist:primary="funding_source">
7500                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7501                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7502                 </fields>
7503                 <links>
7504                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7505                 </links>
7506         </class>
7507
7508         <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">
7509                 <fields oils_persist:primary="funding_source">
7510                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7511                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7512                 </fields>
7513                 <links>
7514                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7515                 </links>
7516         </class>
7517
7518         <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">
7519                 <fields oils_persist:primary="fund">
7520                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7521                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7522                 </fields>
7523                 <links>
7524                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7525                 </links>
7526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7527             <actions>
7528                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7529                                         <context link="fund" field="org" />
7530                 </retrieve>
7531             </actions>
7532         </permacrud>
7533     </class>
7534     <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">
7535         <oils_persist:source_definition><![CDATA[
7536             SELECT
7537                 acqf.*,
7538                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7539                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7540                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7541                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7542             FROM
7543                 acq.fund acqf
7544                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7545                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7546                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7547                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7548         ]]></oils_persist:source_definition>
7549         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7550             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7551             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7552             <field reporter:label="Name" name="name" reporter:datatype="text" />
7553             <field reporter:label="Year" name="year" reporter:datatype="int" />
7554             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7555             <field reporter:label="Code" name="code" reporter:datatype="text" />
7556             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7557             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7558             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7559             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7560             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7561
7562             <!-- non fund-native fields -->
7563             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7564             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7565             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7566             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7567         </fields>
7568         <links>
7569             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7570             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7571             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7572         </links>
7573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7574             <actions>
7575                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7576             </actions>
7577         </permacrud>
7578         </class>
7579         <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">
7580                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7581                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7582                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7583                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7584                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7585                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7586                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7587                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7588                 </fields>
7589                 <links>
7590                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7591                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7592                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7593                 </links>
7594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7595                         <actions>
7596                                 <create permission="ADMIN_ACQ_FUND">
7597                     <context link="fund" field="org"/>
7598                 </create>
7599                                 <retrieve permission="ADMIN_ACQ_FUND">
7600                     <context link="fund" field="org"/>
7601                 </retrieve>
7602                                 <update permission="ADMIN_ACQ_FUND">
7603                     <context link="fund" field="org"/>
7604                 </update>
7605                                 <delete permission="ADMIN_ACQ_FUND">
7606                     <context link="fund" field="org"/>
7607                 </delete>
7608                         </actions>
7609                 </permacrud>
7610         </class>
7611
7612     <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">
7613         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7614             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7615             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7616             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7617             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7618             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7619             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7620             <field reporter:label="Note" name="note" reporter:datatype="text" />
7621             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7622         </fields>
7623         <links>
7624             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7625             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7626             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7627         </links>
7628                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7629                         <actions>
7630                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7631                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7632                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7633                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7634                         </actions>
7635                 </permacrud>
7636     </class>
7637
7638         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7640                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7641                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7642                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7643                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7644                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7645                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7646                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7647                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7648                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7649                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7650                 </fields>
7651                 <links>
7652                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7653                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7654                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7655                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7656                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7657                 </links>
7658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7659                         <actions>
7660                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7661                         </actions>
7662                 </permacrud>
7663         </class>
7664
7665         <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">
7666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7667                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7668                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7669                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7670                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7671                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7672                 </fields>
7673                 <links>
7674                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7675                 </links>
7676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7677                         <actions>
7678                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7679                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7680                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7681                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7682                         </actions>
7683                 </permacrud>
7684         </class>
7685
7686         <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">
7687                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7688                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7689                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7690                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7691                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7692                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7693                         <field reporter:label="State" name="state" reporter:datatype="text" />
7694                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7695                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7696                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7697                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7698                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7699                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7700                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7701                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7702                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7703                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7704                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7705                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7706                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7707                 </fields>
7708                 <links>
7709                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7710                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7711                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7712                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7713                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7714                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7715                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7716                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7717                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7718                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7719                 </links>
7720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7721                         <actions>
7722                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7723                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7724                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7725                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7726                         </actions>
7727                 </permacrud>
7728         </class>
7729
7730         <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">
7731                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7732                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7733                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7734                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7735                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7736                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7737                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7738                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7739                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7740                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7741                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7742                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7743                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7744                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7745                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7746                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7747                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7748                 </fields>
7749                 <links>
7750                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7751                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7752                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7753                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7754                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7755                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7756                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7757                 </links>
7758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7759             <actions>
7760                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7761             </actions>
7762                 </permacrud>
7763         </class>
7764
7765         <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">
7766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7767                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7768                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7769                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7770                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7771                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7772                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7773                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7774                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7775                 </fields>
7776                 <links>
7777                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7778                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7779                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7780                 </links>
7781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7782             <actions>
7783                 <create permission="CREATE_PURCHASE_ORDER">
7784                     <context link="purchase_order" field="ordering_agency"/>
7785                 </create>
7786                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7787                     <context link="purchase_order" field="ordering_agency"/>
7788                 </retrieve>
7789                 <update permission="CREATE_PURCHASE_ORDER">
7790                     <context link="purchase_order" field="ordering_agency"/>
7791                 </update>
7792                 <delete permission="CREATE_PURCHASE_ORDER">
7793                     <context link="purchase_order" field="ordering_agency"/>
7794                 </delete>
7795             </actions>
7796                 </permacrud>
7797         </class>
7798
7799         <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">
7800                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7801                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7802                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7803                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7804                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7805                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7806                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7807                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7808                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7809                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7810                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7811                 </fields>
7812                 <links>
7813                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7814                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7815                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7816                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7817                 </links>
7818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7819             <actions>
7820                 <create permission="CREATE_PURCHASE_ORDER">
7821                     <context link="purchase_order" field="ordering_agency"/>
7822                 </create>
7823                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7824                     <context link="purchase_order" field="ordering_agency"/>
7825                 </retrieve>
7826                 <update permission="CREATE_PURCHASE_ORDER">
7827                     <context link="purchase_order" field="ordering_agency"/>
7828                 </update>
7829                 <delete permission="CREATE_PURCHASE_ORDER">
7830                     <context link="purchase_order" field="ordering_agency"/>
7831                 </delete>
7832             </actions>
7833                 </permacrud>
7834         </class>
7835
7836         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7837                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7838                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7839                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7840                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7841                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7842                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7843                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7844                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7845                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7846                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7847                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7848                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7849                         <field reporter:label="State" name="state" reporter:datatype="text" />
7850                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7851                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7852                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7853                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7854                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7855                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7856                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7857                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7858                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7859                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7860                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7861                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7862                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7863                 </fields>
7864                 <links>
7865                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7866                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7867                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7868                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7869                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7870                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7871                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7872                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7873                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7874                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7875                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7876                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7877                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7878                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7879                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7880                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7881                 </links>
7882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7883                         <actions>
7884                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7885                                         <context link="purchase_order" field="ordering_agency"/>
7886                                         <context link="picklist" field="org_unit"/>
7887                                 </retrieve>
7888                         </actions>
7889                 </permacrud>
7890         </class>
7891
7892         <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">
7893                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7894                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7895                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7896                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7897                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7898                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7899                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7900                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7901                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7902                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7903                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7904                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7905                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7906                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7907                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7908                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7909                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7910                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7911                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7912                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7913                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7914                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7915                 </fields>
7916                 <links>
7917                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7918                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7919                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7920                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7921                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7922                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7923                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7924                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7925                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7926                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7927                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7928                 </links>
7929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7930                         <actions>
7931                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7932                                         <context link="purchase_order" field="ordering_agency"/>
7933                                         <context link="picklist" field="org_unit"/>
7934                                 </retrieve>
7935                         </actions>
7936                 </permacrud>
7937         </class>
7938
7939         <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">
7940                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7941                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7942                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7943                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7944                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7945                 </fields>
7946                 <links>
7947                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7948                 </links>
7949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7950                         <actions>
7951                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7952                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7953                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7954                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7955                         </actions>
7956                 </permacrud>
7957         </class>
7958
7959         <class id="acqlin" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_note" oils_persist:tablename="acq.lineitem_note" reporter:label="Line Item Note">
7960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7961                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7962                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7963                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7964                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7965                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7966                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7967                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7968                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7969                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7970                 </fields>
7971                 <links>
7972                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7973                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7974                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7975                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7976                 </links>
7977         </class>
7978
7979         <class id="acqlia" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr" oils_persist:tablename="acq.lineitem_attr" reporter:label="Line Item Attribute">
7980                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7981                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7982                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7983                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7984                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7985                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7986                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7987                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
7988                 </fields>
7989                 <links>
7990                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7991                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7992                 </links>
7993         </class>
7994
7995         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
7996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7997                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7998                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7999                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8000                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8001                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8002                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8003                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8004                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8005                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8006                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8007                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8008                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8009                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8010                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8011                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8012                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8013                 </fields>
8014                 <links>
8015                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8016                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8017                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8018                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8019                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8020                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8021                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8022                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8023                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8024                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8025                 </links>
8026         </class>
8027
8028         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
8029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8030                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8031                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8032                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8033                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8034                 </fields>
8035                 <links/>
8036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8037                         <actions>
8038                                 <retrieve />
8039                         </actions>
8040                 </permacrud>
8041         </class>
8042
8043         <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
8044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8045                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8046                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8047                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8048                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8049                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8050             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8051                 </fields>
8052                 <links/>
8053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8054             <actions>
8055                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8056                 <retrieve />
8057                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8058                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8059             </actions>
8060         </permacrud>
8061         </class>
8062
8063         <class id="acqligad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_generated_attr_definition" oils_persist:tablename="acq.lineitem_generated_attr_definition" reporter:label="Line Item Generated Attribute Definition">
8064                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8065                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8066                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8067                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8068                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8069                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8070                 </fields>
8071                 <links/>
8072         </class>
8073         <class id="acqliuad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_usr_attr_definition" oils_persist:tablename="acq.lineitem_usr_attr_definition" reporter:label="Line Item User Attribute Definition">
8074                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8075                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8076                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8077                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8078                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8079                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8080                 </fields>
8081                 <links>
8082                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8083                 </links>
8084         </class>
8085
8086         <class id="acqlipad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_provider_attr_definition" oils_persist:tablename="acq.lineitem_provider_attr_definition" reporter:label="Line Item Provider Attribute Definition">
8087             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8088                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8089                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8090                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8091                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8092                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8093                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8094         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8095
8096             </fields>
8097             <links>
8098                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8099             </links>
8100             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8101                 <actions>
8102                     <create permission="ADMIN_PROVIDER">
8103                         <context link="provider" field="owner"/>
8104                     </create>
8105                     <retrieve permission="ADMIN_PROVIDER">
8106                         <context link="provider" field="owner"/>
8107                     </retrieve>
8108                     <update permission="ADMIN_PROVIDER">
8109                         <context link="provider" field="owner"/>
8110                     </update>
8111                     <delete permission="ADMIN_PROVIDER">
8112                         <context link="provider" field="owner"/>
8113                     </delete>
8114                 </actions>
8115             </permacrud>
8116         </class>
8117         
8118         <class id="acqphsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_holding_subfield_map" oils_persist:tablename="acq.provider_holding_subfield_map" reporter:label="Provider Holding Subfield Map">
8119             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8120                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8121                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8122                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8123                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8124             </fields>
8125             <links>
8126                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8127             </links>
8128             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8129                 <actions>
8130                     <create permission="ADMIN_PROVIDER">
8131                         <context link="provider" field="owner"/>
8132                     </create>
8133                     <retrieve permission="ADMIN_PROVIDER">
8134                         <context link="provider" field="owner"/>
8135                     </retrieve>
8136                     <update permission="ADMIN_PROVIDER">
8137                         <context link="provider" field="owner"/>
8138                     </update>
8139                     <delete permission="ADMIN_PROVIDER">
8140                         <context link="provider" field="owner"/>
8141                     </delete>
8142                 </actions>
8143             </permacrud>
8144         </class>
8145         
8146         <class id="acqlilad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_local_attr_definition" oils_persist:tablename="acq.lineitem_local_attr_definition" reporter:label="Line Item Local Attribute Definition">
8147             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8148                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8149                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8150                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8151                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8152                 </fields>
8153                 <links/>
8154         </class>
8155
8156         <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
8157                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8158                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8159                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8160                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8161                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8162                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8163                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8164                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8165                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8166                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8167                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8168                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8169                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8170                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8171                 </fields>
8172                 <links>
8173                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8174                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8175                 </links>
8176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8177             <actions>
8178                 <create permission="ADMIN_PROVIDER">
8179                     <context link="provider" field="owner"/>
8180                 </create>
8181                 <retrieve permission="ADMIN_PROVIDER">
8182                     <context link="provider" field="owner"/>
8183                 </retrieve>
8184                 <update permission="ADMIN_PROVIDER">
8185                     <context link="provider" field="owner"/>
8186                 </update>
8187                 <delete permission="ADMIN_PROVIDER">
8188                     <context link="provider" field="owner"/>
8189                 </delete>
8190             </actions>
8191         </permacrud>
8192         </class>
8193
8194         <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
8195                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8196                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8197                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8198                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8199                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8200                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8201                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8202                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8203                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8204                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8205                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8206                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8207                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8208                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8209                 </fields>
8210                 <links>
8211                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8212                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8213                 </links>
8214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8215             <actions>
8216                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8217                     <context link="account" jump="provider" field="owner"/>
8218                 </retrieve>
8219                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8220                     <context link="account" jump="provider" field="owner"/>
8221                 </update>
8222                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8223                     <context link="account" jump="provider" field="owner"/>
8224                 </delete>
8225             </actions>
8226         </permacrud>
8227         </class>
8228
8229
8230         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8231                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8232                         <field name="id" reporter:datatype="id" />
8233                         <field name="parent" reporter:datatype="link"/>
8234                         <field name="owner" reporter:datatype="link"/>
8235                         <field name="create_time" reporter:datatype="timestamp"/>
8236                         <field name="name" reporter:datatype="text"/>
8237                         <field name="shared" reporter:datatype="bool"/>
8238                         <field name="share_with" reporter:datatype="link"/>
8239                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8240                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8241                 </fields>
8242                 <links>
8243                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8244                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8245                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8246                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8247                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8248                 </links>
8249         </class>
8250         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8251                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8252                         <field name="id" reporter:datatype="id" />
8253                         <field name="parent" reporter:datatype="link"/>
8254                         <field name="owner" reporter:datatype="link"/>
8255                         <field name="create_time" reporter:datatype="timestamp"/>
8256                         <field name="name" reporter:datatype="text"/>
8257                         <field name="shared" reporter:datatype="bool"/>
8258                         <field name="share_with" reporter:datatype="link"/>
8259                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8260                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8261                 </fields>
8262                 <links>
8263                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8264                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8265                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8266                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8267                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8268                 </links>
8269         </class>
8270         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8271                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8272                         <field name="id" reporter:datatype="id" />
8273                         <field name="parent" reporter:datatype="link"/>
8274                         <field name="owner" reporter:datatype="link"/>
8275                         <field name="create_time" reporter:datatype="timestamp"/>
8276                         <field name="name" reporter:datatype="text"/>
8277                         <field name="shared" reporter:datatype="bool"/>
8278                         <field name="share_with" reporter:datatype="link"/>
8279                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8280                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8281                 </fields>
8282                 <links>
8283                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8284                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8285                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8286                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8287                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8288                 </links>
8289         </class>
8290         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8291                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8292                         <field name="id" reporter:datatype="id" />
8293                         <field name="owner" reporter:datatype="link"/>
8294                         <field name="create_time" reporter:datatype="timestamp"/>
8295                         <field name="name" reporter:datatype="text"/>
8296                         <field name="data" reporter:datatype="text"/>
8297                         <field name="folder" reporter:datatype="link"/>
8298                         <field name="description" reporter:datatype="text"/>
8299                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8300                 </fields>
8301                 <links>
8302                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8303                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8304                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8305                 </links>
8306         </class>
8307         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8308                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8309                         <field name="id" reporter:datatype="id" />
8310                         <field name="owner" reporter:datatype="link"/>
8311                         <field name="create_time" reporter:datatype="timestamp"/>
8312                         <field name="template" reporter:datatype="link"/>
8313                         <field name="data" reporter:datatype="text"/>
8314                         <field name="folder" reporter:datatype="link"/>
8315                         <field name="recur" reporter:datatype="bool"/>
8316                         <field name="recurrence" reporter:datatype="interval"/>
8317                         <field name="name" reporter:datatype="text"/>
8318                         <field name="description" reporter:datatype="text"/>
8319                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8320                 </fields>
8321                 <links>
8322                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8323                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8324                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8325                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8326                 </links>
8327         </class>
8328         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8329                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8330                         <field name="id" reporter:datatype="id" />
8331                         <field name="runner" reporter:datatype="link"/>
8332                         <field name="start_time" reporter:datatype="timestamp"/>
8333                         <field name="complete_time" reporter:datatype="timestamp"/>
8334                         <field name="run_time" reporter:datatype="timestamp"/>
8335                         <field name="email" reporter:datatype="text"/>
8336                         <field name="excel_format" reporter:datatype="bool"/>
8337                         <field name="csv_format" reporter:datatype="bool"/>
8338                         <field name="html_format" reporter:datatype="bool"/>
8339                         <field name="error_code" reporter:datatype="int"/>
8340                         <field name="error_text" reporter:datatype="text"/>
8341                         <field name="report" reporter:datatype="link"/>
8342                         <field name="folder" reporter:datatype="link"/>
8343                         <field name="chart_pie" reporter:datatype="bool"/>
8344                         <field name="chart_bar" reporter:datatype="bool"/>
8345                         <field name="chart_line" reporter:datatype="bool"/>
8346                 </fields>
8347                 <links>
8348                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8349                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8350                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8351                 </links>
8352         </class>
8353         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
8354                 <fields oils_persist:primary="id">
8355                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8356                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8357                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8358                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8359                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8360                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8361                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8362                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8363                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8364                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8365                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8366                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8367                 </fields>
8368                 <links>
8369                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8370                 </links>
8371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8372                         <actions>
8373                                 <retrieve />
8374                         </actions>
8375                 </permacrud>
8376         </class>
8377         <class id="rssr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::super_simple_record" oils_persist:tablename="reporter.super_simple_record" reporter:label="Simple Record Extracts">
8378                 <fields oils_persist:primary="id">
8379                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8380                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8381                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8382                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8383                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8384                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8385                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8386                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8387                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8388                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8389                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8390                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8391                 </fields>
8392                 <links>
8393                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8394                 </links>
8395         </class>
8396         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8397                 <fields oils_persist:primary="id">
8398                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8399                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8400                         <field reporter:label="Fingerprint" name="fingerprint" />
8401                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8402                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8403                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8404                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8405                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8406                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8407                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8408                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8409                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8410                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8411                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8412                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8413                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8414                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8415                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8416                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8417                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8418                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8419                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8420                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8421                 </fields>
8422                 <links>
8423                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8424                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8425                 </links>
8426         </class>
8427         <class id="rud" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::user_demographic" oils_persist:tablename="reporter.demographic" reporter:label="User Demographics">
8428                 <fields oils_persist:primary="id">
8429                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8430                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8431                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8432                 </fields>
8433                 <links>
8434                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8435                 </links>
8436         </class>
8437         <class id="rcirct" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::circulation_type" oils_persist:tablename="reporter.circ_type" reporter:label="Circulation Type">
8438                 <fields oils_persist:primary="id">
8439                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8440                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8441                 </fields>
8442                 <links>
8443                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8444                 </links>
8445         </class>
8446         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
8447                 <fields oils_persist:primary="id">
8448                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8449                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8450                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8451                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8452                 </fields>
8453                 <links>
8454                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8455                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8456                 </links>
8457         </class>
8458         <class id="rxbt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_billing_totals" oils_persist:tablename="reporter.xact_billing_totals" reporter:label="Transaction Billing Totals">
8459                 <fields oils_persist:primary="xact">
8460                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8461                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8462                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8463                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8464                 </fields>
8465                 <links>
8466                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8467                 </links>
8468         </class>
8469         <class id="rxpt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_paid_totals" oils_persist:tablename="reporter.xact_paid_totals" reporter:label="Transaction Paid Totals">
8470                 <fields oils_persist:primary="xact">
8471                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8472                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8473                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8474                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8475                 </fields>
8476                 <links>
8477                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8478                 </links>
8479         </class>
8480         <class id="ergbhu" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::global_bibs_by_holding_update" oils_persist:tablename="extend_reporter.global_bibs_by_holding_update" reporter:label="Bib IDs by Holding Add/Delete Time (OCLC batch update)">
8481                 <fields oils_persist:primary="id">
8482                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8483                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8484                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8485                 </fields>
8486                 <links>
8487                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8488                 </links>
8489         </class>
8490         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
8491                 <fields oils_persist:primary="id">
8492                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8493                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8494                 </fields>
8495                 <links>
8496                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8497                 </links>
8498         </class>
8499         <class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">
8500                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8501                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8502                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8503                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8504                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8505                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8506                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8507                 </fields>
8508                 <links>
8509                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8510                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8511                 </links>
8512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513                         <actions>
8514                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8515                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8516                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8517                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8518                         </actions>
8519                 </permacrud>
8520         </class>
8521         <class id="acqdfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_entry" oils_persist:tablename="acq.distribution_formula_entry" reporter:label="Distribution Formula Entry">
8522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8523                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8524                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8525                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8526                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8527                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8528                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8529                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8530                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8531                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8532                 </fields>
8533                 <links>
8534                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8535                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8536                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8537                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8538                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8539                 </links>
8540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8541                         <actions>
8542                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8543                                         <context link="formula" field="owner"/>
8544                                 </create>
8545                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8546                                         <context link="formula" field="owner"/>
8547                                 </retrieve>
8548                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8549                                         <context link="formula" field="owner"/>
8550                                 </update>
8551                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8552                                         <context link="formula" field="owner"/>
8553                                 </delete>
8554                         </actions>
8555                 </permacrud>
8556         </class>
8557
8558         <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">
8559                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8561                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8562                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8563                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8564                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8565                 </fields>
8566                 <links>
8567                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8568                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8569                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8570                 </links>
8571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8572                         <actions>
8573                                 <create permission="CREATE_PURCHASE_ORDER">
8574                                         <context link="formula" field="owner"/>
8575                 </create>
8576                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8577                                         <context link="formula" field="owner"/>
8578                 </retrieve>
8579                                 <update permission="CREATE_PURCHASE_ORDER">
8580                                         <context link="formula" field="owner"/>
8581                 </update>
8582                                 <delete permission="CREATE_PURCHASE_ORDER">
8583                                         <context link="formula" field="owner"/>
8584                 </delete>
8585                         </actions>
8586                 </permacrud>
8587         </class>
8588
8589         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8590                 <fields oils_persist:primary="id">
8591                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8592                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8593                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8594                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8595                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8596                 </fields>
8597                 <links>
8598                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8599                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8600                 </links>
8601         </class>
8602
8603         <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">
8604                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8605                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8606                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8607                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8608                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8609                 </fields>
8610                 <links>
8611                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8612                 </links>
8613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8614                         <actions>
8615                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8616                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8617                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8618                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8619                         </actions>
8620                 </permacrud>
8621         </class>
8622
8623         <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">
8624                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8625                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8626                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8627                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8628                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8629                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8630                 </fields>
8631                 <links>
8632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8633                 </links>
8634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8635                         <actions>
8636                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8637                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8638                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8639                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8640                         </actions>
8641                 </permacrud>
8642         </class>
8643
8644         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8645                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8646                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8647                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8648                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8649                 </fields>
8650                 <links>
8651                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8652                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8653                 </links>
8654         </class>
8655
8656         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8657                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8658                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8659                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8660                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8661                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8662                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8663                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8664                 </fields>
8665                 <links>
8666                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8667                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8668                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8669                 </links>
8670         </class>
8671
8672         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8674                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8675                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8676                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8677                 </fields>
8678                 <links>
8679                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8680                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8681                 </links>
8682         </class>
8683
8684         <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">
8685                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8686                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8687                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8688                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8689                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8690                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8691                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8692                 </fields>
8693                 <links>
8694                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8695                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8696                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8697                 </links>
8698         </class>
8699
8700         <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">
8701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8702                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8703                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8704                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8705                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8706                 </fields>
8707                 <links>
8708                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8709                 </links>
8710                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8711             <actions>
8712                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8713                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8714                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8715                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8716             </actions>
8717                 </permacrud>
8718         </class>
8719
8720         <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">
8721                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8722                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8723                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8724                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8725                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8726                 </fields>
8727                 <links>
8728                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8729                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8730                 </links>
8731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8732                         <actions>
8733                                 <create permission="ADMIN_CLAIM_POLICY">
8734                                         <context link="claim_policy" field="org_unit"/>
8735                 </create>
8736                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8737                                         <context link="claim_policy" field="org_unit"/>
8738                 </retrieve>
8739                                 <update permission="ADMIN_CLAIM_POLICY">
8740                                         <context link="claim_policy" field="org_unit"/>
8741                 </update>
8742                                 <delete permission="ADMIN_CLAIM_POLICY">
8743                                         <context link="claim_policy" field="org_unit"/>
8744                 </delete>
8745                         </actions>
8746                 </permacrud>
8747         </class>
8748
8749     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8750         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8751             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8752             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8753             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8754             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8755             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8756             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8757             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8758             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8759             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8760             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8761             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8762             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8763             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8764             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8765             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8766         </fields>
8767     </class>
8768
8769     <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">
8770         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8771             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8772             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8773             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8774             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8775             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8776         </fields>
8777     </class>
8778
8779     <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">
8780         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8781             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8782             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8783             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8784             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8785             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8786             <field reporter:label="City" name="city" reporter:datatype="text"/>
8787             <field reporter:label="State" name="state" reporter:datatype="text"/>
8788             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8789             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8790             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8791         </fields>
8792     </class>
8793
8794     <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">
8795         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8796             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8797             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8798             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8799             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8800             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8801             <field reporter:label="City" name="city" reporter:datatype="text"/>
8802             <field reporter:label="State" name="state" reporter:datatype="text"/>
8803             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8804             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8805             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8806         </fields>
8807     </class>
8808
8809     <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">
8810         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8811             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8812             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8813             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8814             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8815             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8816             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8817         </fields>
8818     </class>
8819
8820         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8821                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8822                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8823                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8824                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8825                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8826                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8827                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8828                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8829                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8830                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8831                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8832                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8833                 </fields>
8834                 <links>
8835                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8836                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8837                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8838                 </links>
8839         </class>
8840
8841         <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">
8842                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8843                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8844                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8845                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8846                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8847                 </fields>
8848                 <links>
8849                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8850                 </links>
8851         </class>
8852
8853     <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">
8854         <fields>
8855             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8856             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8857             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8858         </fields>
8859                 <links>
8860                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8861                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8862                 </links>
8863     </class>
8864
8865     <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">
8866         <fields>
8867             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8868             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8869         </fields>
8870                 <links>
8871                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8872                 </links>
8873     </class>
8874
8875     <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">
8876         <fields>
8877             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8878             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8879             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8880         </fields>
8881                 <links>
8882                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8883                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8884                 </links>
8885     </class>
8886
8887     <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">
8888         <fields>
8889             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8890             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8891         </fields>
8892                 <links>
8893                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8894                 </links>
8895     </class>
8896
8897     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8898                 <oils_persist:source_definition>
8899
8900             SELECT  DISTINCT l.*
8901               FROM  action.unfulfilled_hold_loops l
8902                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8903               WHERE l.count = m.max
8904
8905                 </oils_persist:source_definition>
8906         <fields>
8907             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8908             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8909             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8910         </fields>
8911                 <links>
8912                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8913                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8914                 </links>
8915     </class>
8916
8917         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8918                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8919                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8920                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8921                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8922                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8923                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8924                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8925                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8926                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8927                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8928                 </fields>
8929                 <links>
8930                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8931                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8932                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8933                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8934                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8935                 </links>
8936         </class>
8937
8938         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8939                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8940                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8941                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8942                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8943                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8944                 </fields>
8945                 <links>
8946                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8947                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8948                 </links>
8949         </class>
8950
8951         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8952                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8953                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8954                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8955                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8956                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8957                 </fields>
8958                 <links>
8959                 </links>
8960         </class>
8961
8962         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8963                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8964                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8965                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8966                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8967                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8968                 </fields>
8969                 <links>
8970                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8971                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8972                 </links>
8973         </class>
8974         
8975         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8976                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8977                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8978                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8979                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8980                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8981                 </fields>
8982                 <links>
8983                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8984                 </links>
8985         </class>
8986         
8987         <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">
8988                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8989                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8990                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8991                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8992                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8993                 </fields>
8994                 <links>
8995                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8996                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8997                 </links>
8998         </class>
8999
9000         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9001                 <fields oils_persist:primary="name">
9002                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9003                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9004                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9005                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9006                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9007                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9008                 </fields>
9009                 <links>
9010                 </links>
9011         </class>
9012
9013         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9014                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9015                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9016                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9017                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9018                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9019                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9020                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9021                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9022                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9023                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9024                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9025                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9026                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9027                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9028                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9029                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9030                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9031                 </fields>
9032                 <links>
9033                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9034                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9035                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9036                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9037                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9038                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9039                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9040                 </links>
9041         </class>
9042
9043         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9044                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9045                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9046                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9047                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9048                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9049                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9050                 </fields>
9051                 <links>
9052                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9053                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9054                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9055                 </links>
9056         </class>
9057
9058         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9059                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9060                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9061                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9062                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9063                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9064                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9065                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9066                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9067                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9068                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9069                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9070                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9071                 </fields>
9072                 <links>
9073                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9074                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9075                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9076                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9077                 </links>
9078         </class>
9079
9080         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9081                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9082                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9083                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9084                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9085                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9086                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9087                 </fields>
9088                 <links>
9089                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9090                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9091                 </links>
9092         </class>
9093
9094         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9095                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9096                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9097                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9098                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9099                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9100                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9101                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9102                 </fields>
9103                 <links>
9104                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9105                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9106                 </links>
9107         </class>
9108
9109         <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">
9110                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9111                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9112                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9113                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9114                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9115                 </fields>
9116                 <links>
9117                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9118                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9119                 </links>
9120         </class>
9121
9122         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9123                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9124                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9125                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9126                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9127                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9128                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9129                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9130                 </fields>
9131                 <links>
9132                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9133                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9134                 </links>
9135         </class>
9136
9137         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9138                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9139                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9140                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9141                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9143                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9144                 </fields>
9145                 <links>
9146                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9147                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9148                 </links>
9149         </class>
9150
9151         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9152                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9153                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9154                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9155                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9156                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9157                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9158                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9159                 </fields>
9160                 <links>
9161                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9162                 </links>
9163         </class>
9164
9165         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9166                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9167                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9168                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9169                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9170                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9171                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9172                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9173                 </fields>
9174                 <links>
9175                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9176                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9177                 </links>
9178         </class>
9179
9180         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9181                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9182                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9183                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9184                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9185                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9186                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9187                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9188                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9189                 </fields>
9190                 <links>
9191                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9192                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9193                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9194                 </links>
9195         </class>
9196
9197         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9198                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9199                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9200                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9201                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9202                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9203                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9204                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9205                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9206                 </fields>
9207                 <links>
9208                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9209                 </links>
9210         </class>
9211
9212         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9213                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9214                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9215                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9216                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9217                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9218                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9219                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9220                 </fields>
9221                 <links>
9222                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9223                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9224                 </links>
9225         </class>
9226
9227         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9228                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9229                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9230                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9231                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9232                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9233                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9234                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9235                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9236                 </fields>
9237                 <links>
9238                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9239                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9240                 </links>
9241         </class>
9242
9243         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9244                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9245                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9246                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9247                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9248                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9249                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9250                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9251                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9252                 </fields>
9253                 <links>
9254                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9255                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9256                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9257                 </links>
9258         </class>
9259
9260         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9261                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9262                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9263                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9264                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9265                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9266                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9267                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9268                 </fields>
9269                 <links>
9270                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9271                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9272                 </links>
9273         </class>
9274
9275         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9276                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9277                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9278                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9279                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9280                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9281                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9282                 </fields>
9283                 <links>
9284                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9285                 </links>
9286         </class>
9287
9288         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9289                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9290                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9291                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9292                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9293                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9294                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9295                 </fields>
9296                 <links>
9297                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9298                 </links>
9299         </class>
9300
9301         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9302                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9303                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9304                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9305                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9306                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9307                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9308                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9309                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9310                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9311                 </fields>
9312                 <links>
9313                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9314                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9315                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9316                 </links>
9317         </class>
9318
9319         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9320                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9321                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9322                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9323                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9324                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9325                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9326                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9327                 </fields>
9328                 <links>
9329                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9330                 </links>
9331         </class>
9332
9333         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9334                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9335                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9336                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9337                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9338                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9339                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9340                 </fields>
9341                 <links>
9342                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9343                 </links>
9344         </class>
9345
9346         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9347                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9348                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9349                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9350                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9351                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9352                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9353                 </fields>
9354                 <links>
9355                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9356                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9357                 </links>
9358         </class>
9359
9360         <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">
9361                 <fields oils_persist:primary="id">
9362                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9363                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9364                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9365                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9366                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9367                 </fields>
9368                 <links>
9369                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9370                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9371                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9372                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9373                 </links>
9374         </class>
9375
9376         <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">
9377                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9378                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9379                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9380                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9381                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9382                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9383                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9384                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9385                 </fields>
9386                 <links/>
9387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9388                         <actions>
9389                                 <retrieve/>
9390                         </actions>
9391                 </permacrud>
9392         </class>
9393
9394         <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">
9395                 <fields oils_persist:primary="ptype_key">
9396                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9397                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9398                 </fields>
9399                 <links/>
9400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9401                         <actions>
9402                                 <retrieve/>
9403                         </actions>
9404                 </permacrud>
9405         </class>
9406
9407         <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">
9408                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9410                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9411                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9412                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9413                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9414                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9415                 </fields>
9416                 <links>
9417                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9418                 </links>
9419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9420                         <actions>
9421                                 <retrieve/>
9422                         </actions>
9423                 </permacrud>
9424         </class>
9425
9426         <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">
9427                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9428                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9429                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9430                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9431                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9432                 </fields>
9433                 <links>
9434                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9435                 </links>
9436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9437                         <actions>
9438                                 <retrieve/>
9439                         </actions>
9440                 </permacrud>
9441         </class>
9442
9443     <class
9444         id="uvs"
9445         controller="open-ils.cstore open-ils.pcrud"
9446         oils_obj:fieldmapper="url_verify::session"
9447         oils_persist:tablename="url_verify.session"
9448         reporter:label="URL Verification Session"
9449     >
9450         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9451             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9452             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9453                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9454             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9455             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9456             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9457             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9458             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9459             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9460         </fields>
9461
9462         <links>
9463             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9464             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9465             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9466             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9467             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9468         </links>
9469
9470         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9471             <actions>
9472                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9473             </actions>
9474         </permacrud>
9475
9476     </class>
9477
9478     <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">
9479         <oils_persist:source_definition>
9480             SELECT
9481                 cbrebi.id AS id,  -- so we can have a pkey in our view
9482                 uvs.id AS session,
9483                 uvs.owning_lib,
9484                 cbrebi.target_biblio_record_entry
9485             FROM url_verify.session uvs
9486             JOIN container.biblio_record_entry_bucket cbreb
9487                 ON (uvs.container = cbreb.id)
9488             JOIN container.biblio_record_entry_bucket_item cbrebi
9489                 ON (cbrebi.bucket = cbreb.id)
9490         </oils_persist:source_definition>
9491         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9492             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9493             <field reporter:label="Session" name="session" reporter:datatype="link" />
9494             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9495             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9496         </fields>
9497         <links>
9498             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9499             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9500             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9501         </links>
9502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9503             <actions>
9504                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9505             </actions>
9506         </permacrud>
9507     </class>
9508
9509     <class
9510         id="uvus"
9511         controller="open-ils.cstore open-ils.pcrud"
9512         oils_obj:fieldmapper="url_verify::url_selector"
9513         oils_persist:tablename="url_verify.url_selector"
9514         reporter:label="URL Verification URL Selector"
9515     >
9516         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9517             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9518             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9519                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9520             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9521         </fields>
9522
9523         <links>
9524             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9525             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9526         </links>
9527
9528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9529             <actions>
9530                 <create permission="URL_VERIFY">
9531                     <context link="session" field="owning_lib"/>
9532                 </create>
9533                 <retrieve permission="URL_VERIFY">
9534                     <context link="session" field="owning_lib"/>
9535                 </retrieve>
9536                 <update permission="URL_VERIFY">
9537                     <context link="session" field="owning_lib"/>
9538                 </update>
9539                 <delete permission="URL_VERIFY">
9540                     <context link="session" field="owning_lib"/>
9541                 </delete>
9542             </actions>
9543         </permacrud>
9544
9545     </class>
9546
9547     <class
9548         id="uvu"
9549         controller="open-ils.cstore open-ils.pcrud"
9550         oils_obj:fieldmapper="url_verify::url"
9551         oils_persist:tablename="url_verify.url"
9552         reporter:label="URL Verification URL"
9553     >
9554         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9555             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9556                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9557                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9558                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9559                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9560             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9561             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9562             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9563             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9564             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9565             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9566             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9567             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9568             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9569             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9570             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9571             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9572             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9573         </fields>
9574
9575         <links>
9576             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9577             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9578             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9579             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9580             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9581         </links>
9582
9583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9584             <actions>
9585                 <create permission="URL_VERIFY">
9586                     <context link="session" field="owning_lib"/>
9587                 </create>
9588                 <retrieve permission="URL_VERIFY">
9589                     <context link="session" field="owning_lib"/>
9590                 </retrieve>
9591                 <update permission="URL_VERIFY">
9592                     <context link="session" field="owning_lib"/>
9593                 </update>
9594                 <delete permission="URL_VERIFY">
9595                     <context link="session" field="owning_lib"/>
9596                 </delete>
9597             </actions>
9598         </permacrud>
9599
9600     </class>
9601
9602     <class
9603         id="uvva"
9604         controller="open-ils.cstore open-ils.pcrud"
9605         oils_obj:fieldmapper="url_verify::verification_attempt"
9606         oils_persist:tablename="url_verify.verification_attempt"
9607         reporter:label="URL Verification Attempt"
9608     >
9609         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9610             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9611                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9612                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9613             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9614             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9615         </fields>
9616
9617         <links>
9618             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9619             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9620         </links>
9621
9622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9623             <actions>
9624                 <create permission="URL_VERIFY">
9625                     <context link="session" field="owning_lib"/>
9626                 </create>
9627                 <retrieve permission="URL_VERIFY">
9628                     <context link="session" field="owning_lib"/>
9629                 </retrieve>
9630                 <update permission="URL_VERIFY">
9631                     <context link="session" field="owning_lib"/>
9632                 </update>
9633                 <delete permission="URL_VERIFY">
9634                     <context link="session" field="owning_lib"/>
9635                 </delete>
9636             </actions>
9637         </permacrud>
9638
9639     </class>
9640
9641     <class
9642         id="uvuv"
9643         controller="open-ils.cstore open-ils.pcrud"
9644         oils_obj:fieldmapper="url_verify::url_verification"
9645         oils_persist:tablename="url_verify.url_verification"
9646         reporter:label="URL Verification"
9647     >
9648         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9649             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9650                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9651                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9652             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9653             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9654             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9655             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9656                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9657         </fields>
9658
9659         <links>
9660             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9661             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9662             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9663         </links>
9664
9665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9666             <actions>
9667                 <create permission="URL_VERIFY">
9668                     <context link="attempt" jump="session" field="owning_lib"/>
9669                 </create>
9670                 <retrieve permission="URL_VERIFY">
9671                     <context link="attempt" jump="session" field="owning_lib"/>
9672                 </retrieve>
9673                 <update permission="URL_VERIFY">
9674                     <context link="attempt" jump="session" field="owning_lib"/>
9675                 </update>
9676                 <delete permission="URL_VERIFY">
9677                     <context link="attempt" jump="session" field="owning_lib"/>
9678                 </delete>
9679             </actions>
9680         </permacrud>
9681
9682     </class>
9683
9684         <class
9685                 id="cfdi"
9686                 controller="open-ils.cstore open-ils.pcrud"
9687                 oils_obj:fieldmapper="config::filter_dialog_interface"
9688                 oils_persist:tablename="config.filter_dialog_interface"
9689                 reporter:label="FilterDialog Interface">
9690                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9691                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9692                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9693                 </fields>
9694                 <links>
9695                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9696                 </links>
9697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9698                         <actions>
9699                                 <retrieve />
9700                         </actions>
9701                 </permacrud>
9702         </class>
9703
9704         <class
9705                 id="cfdfs"
9706                 controller="open-ils.cstore open-ils.pcrud"
9707                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9708                 oils_persist:tablename="config.filter_dialog_filter_set"
9709                 reporter:label="FilterDialog Filter Set">
9710                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9711                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9712                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9713                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9714                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9715                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9716                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9717                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9718                 </fields>
9719                 <links>
9720                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9722                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9723                 </links>
9724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9725                         <actions>
9726                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9727                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9728                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9729                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9730                         </actions>
9731                 </permacrud>
9732
9733         </class>
9734
9735         <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">
9736                 <fields oils_persist:primary="code">
9737                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9738                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9739                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9740                 </fields>
9741                 <links/>
9742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9743                         <actions>
9744                                 <retrieve/>
9745                         </actions>
9746                 </permacrud>
9747         </class>
9748
9749         <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">
9750                 <oils_persist:source_definition>
9751
9752             SELECT  b.id,
9753                     MAX(dcp.edit_date) AS last_delete_date
9754              FROM   biblio.record_entry b
9755                     JOIN asset.call_number cn ON (cn.record = b.id)
9756                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9757              WHERE  NOT b.deleted
9758              GROUP BY b.id
9759              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9760
9761                 </oils_persist:source_definition>
9762                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9763                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9764                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9765                 </fields>
9766                 <links>
9767                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9768                 </links>
9769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9770                         <actions>
9771                                 <retrieve/>
9772                         </actions>
9773                 </permacrud>
9774         </class>
9775
9776         <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">
9777                 <oils_persist:source_definition>
9778
9779             -- -- 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.
9780             -- -- 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
9781             -- -- may not.
9782             -- SELECT
9783             --     bre.id AS "bib_id",
9784             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9785             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9786             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9787             -- FROM (
9788                 SELECT
9789                     y.bre AS "id",
9790                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9791                     y.hold_count AS "hold_count",
9792                     (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"
9793                 FROM (
9794                         SELECT
9795                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9796                             COUNT(*) AS "hold_count"
9797                         FROM action.hold_request h
9798                         WHERE
9799                             cancel_time IS NULL
9800                             AND fulfillment_time IS NULL
9801                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9802                         GROUP BY 1
9803                     )y LEFT JOIN (
9804                         SELECT 
9805                             (SELECT id
9806                                 FROM biblio.record_entry 
9807                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9808                             ) AS "bre", 
9809                             COUNT(*) AS "copy_count"
9810                         FROM asset.copy
9811                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9812                         WHERE copy.holdable 
9813                             AND NOT copy.deleted 
9814                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9815                         GROUP BY 1
9816                     )x ON x.bre = y.bre
9817                 -- )z RIGHT JOIN (
9818                 --     SELECT id
9819                 --     FROM biblio.record_entry
9820                 --     WHERE NOT deleted
9821                 -- )bre ON (z.bib_id = bre.id)
9822                 
9823
9824                 </oils_persist:source_definition>
9825                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9826                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9827                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9828                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9829                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9830                 </fields>
9831                 <links>
9832                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9833                 </links>
9834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9835                         <actions>
9836                                 <retrieve/>
9837                         </actions>
9838                 </permacrud>
9839         </class>
9840
9841         <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">
9842                 <oils_persist:source_definition>
9843             SELECT *,
9844                 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,
9845                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9846             FROM
9847                 (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
9848                     FROM
9849                         action.hold_request ahr
9850                         JOIN reporter.hold_request_record rhrr USING (id)
9851                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9852                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9853                     WHERE
9854                         ahr.cancel_time IS NULL
9855                         AND ahr.fulfillment_time IS NULL
9856                     GROUP BY bib_record, pickup_lib
9857                 )x
9858                 JOIN
9859                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9860                     FROM
9861                         action.hold_request ahr
9862                         JOIN reporter.hold_request_record rhrr USING (id)
9863                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9864                     WHERE
9865                         ahr.cancel_time IS NULL
9866                         AND ahr.fulfillment_time IS NULL
9867                     GROUP BY bib_record
9868                 )y
9869                 USING (id)
9870                 </oils_persist:source_definition>
9871                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9872                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9873                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9874                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9875                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9876                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9877                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9878                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9879                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9880                 </fields>
9881                 <links>
9882                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9883                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9884                 </links>
9885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9886                         <actions>
9887                                 <retrieve/>
9888                         </actions>
9889                 </permacrud>
9890         </class>
9891
9892         <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">
9893                 <oils_persist:source_definition>
9894             SELECT
9895                 ac.id,
9896                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9897                 MAX(actac.xact_start) AS last_circ
9898             FROM asset.copy ac
9899                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9900             GROUP BY ac.id
9901
9902             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9903             --SELECT
9904             --    ac.id,
9905             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9906             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9907             --FROM asset.copy ac
9908             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9909             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9910             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9911                 </oils_persist:source_definition>
9912                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9913                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9914                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9915                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9916                 </fields>
9917                 <links>
9918                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9919                 </links>
9920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9921                         <actions>
9922                                 <retrieve/>
9923                         </actions>
9924                 </permacrud>
9925         </class>
9926
9927         <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">
9928                 <fields oils_persist:primary="id">
9929                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
9930                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
9931                 </fields>
9932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9933                         <actions>
9934                                 <retrieve/>
9935                         </actions>
9936                 </permacrud>
9937         </class>
9938
9939         <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">
9940                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
9941                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9942                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
9943                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9944                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9945                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9946                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9947                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9948                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
9949                 </fields>
9950                 <links>
9951                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
9952                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9953                 </links>
9954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9955                         <actions>
9956                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9957                                 <retrieve/>
9958                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9959                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9960                         </actions>
9961                 </permacrud>
9962         </class>
9963
9964         <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">
9965                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
9966                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9967                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
9968                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9969                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9970                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9971                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9972                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9973                 </fields>
9974                 <links>
9975                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
9976                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9977                 </links>
9978                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9979                         <actions>
9980                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9981                                 <retrieve/>
9982                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9983                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9984                         </actions>
9985                 </permacrud>
9986         </class>
9987
9988
9989         <!-- ********************************************************************************************************************* -->
9990         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9991         <!-- ********************************************************************************************************************* -->
9992         <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">
9993                 <fields oils_persist:primary="id">
9994                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9995                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9996                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9997                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9998                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9999                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10000                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10001                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10002                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10003                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10004                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10005                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10006                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10007                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10008                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10009                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10010                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10011                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10012                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10013                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10014                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10015                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10016                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10017                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10018                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10019                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10020                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10021                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10022                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10023                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10024                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10025                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10026                 </fields>
10027                 <links>
10028                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10029                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10030                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10031                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10032                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10033                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10034                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10035                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10036                 </links>
10037         </class>
10038
10039         <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">
10040                 <fields oils_persist:primary="id">
10041                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10042                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10043                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10044                 </fields>
10045                 <links>
10046                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10047                 </links>
10048         </class>
10049
10050         <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">
10051                 <fields oils_persist:primary="id">
10052                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10053                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10054                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10055                 </fields>
10056                 <links>
10057                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10058                 </links>
10059         </class>
10060
10061         <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">
10062                 <fields oils_persist:primary="id">
10063                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10064
10065                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10066                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10067                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10068
10069                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10070                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10071                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10072
10073                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10074                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10075
10076                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10077                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10078                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10079
10080                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10081                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10082
10083                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10084                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10085                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10086
10087                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10088                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10089                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10090
10091                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10092                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10093                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10094                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10095
10096                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10097                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10098
10099                 </fields>
10100                 <links>
10101                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10102                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10103                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10104                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10105                 </links>
10106         </class>
10107
10108         <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">
10109                 <oils_persist:source_definition>
10110
10111             SELECT
10112                 po.ordering_agency AS ordering_agency,
10113                 po.id AS purchase_order,
10114                 li.id AS lineitem,
10115                 lid.id AS lineitem_detail,
10116                 cpa.id AS claim_policy_action
10117             FROM
10118                 acq.lineitem_detail lid
10119                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10120                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10121                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10122                 JOIN acq.claim_policy_action cpa ON (
10123                     cpa.claim_policy = cp.id
10124
10125                     -- we only care about claim policy actions whose claim
10126                     -- interval we'd reached or exceeded
10127                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10128
10129                     -- filter out all claim policy actions where claim events
10130                     -- have occurred on or after the action's action_interval
10131                     AND NOT EXISTS (
10132                         SELECT 1
10133                         FROM
10134                             acq.claim_event evt
10135                             JOIN acq.claim claim ON (
10136                                 claim.id = evt.claim
10137                                 AND claim.lineitem_detail = lid.id
10138                             )
10139                         WHERE
10140                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10141                     )
10142                 )
10143             WHERE
10144                 lid.cancel_reason IS NULL
10145                 AND li.cancel_reason IS NULL -- belt/suspenders
10146                 AND po.cancel_reason IS NULL -- belt/suspenders
10147                 AND lid.recv_time IS NULL
10148                 AND po.state = 'on-order'
10149             ORDER BY 1, 2, 3, 4, 5
10150
10151                 </oils_persist:source_definition>
10152                 <fields>
10153                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10154                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10155                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10156                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10157                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10158                 </fields>
10159                 <links>
10160                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10161                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10162                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10163                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10164                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10165                 </links>
10166         </class>
10167         <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">
10168                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10169                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10170                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10171                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10172                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10173                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10174                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10175                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10176                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10177                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10178                 </fields>
10179                 <links>
10180                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10181                 </links>
10182     </class>
10183         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10184                 <oils_persist:source_definition>
10185             SELECT * FROM acq.lineitem_summary 
10186                                 WHERE item_count > (invoice_count + cancel_count)
10187         </oils_persist:source_definition>
10188                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10189                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10190                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10191                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10192                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10193                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10194                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10195                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10196                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10197                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10198                 </fields>
10199                 <links>
10200                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10201                 </links>
10202     </class>
10203         <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">
10204                 <oils_persist:source_definition>
10205
10206                         SELECT  t.*
10207                           FROM  action.transit_copy t
10208                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10209                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10210                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10211
10212                 </oils_persist:source_definition>
10213                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10214                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10215                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10216                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10217                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10218                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10219                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10220                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10221                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10222                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10223                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10224                 </fields>
10225                 <links>
10226                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10227                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10228                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10229                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10230                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10231                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10232                 </links>
10233         </class>
10234
10235     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10236                 <oils_persist:source_definition>
10237
10238         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10239                 SELECT
10240                         cp.id as copy,
10241                         COUNT(circ.id),
10242                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10243                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10244                 FROM
10245                         asset.copy cp
10246                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10247                 GROUP BY 1, 3, 4
10248                 UNION
10249                 SELECT
10250                         cp.id as copy,
10251                         COUNT(circ.id),
10252                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10253                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10254                 FROM
10255                         asset.copy cp
10256                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10257                 GROUP BY 1, 3, 4
10258                 UNION
10259                 SELECT
10260                         id as copy,
10261                         circ_count,
10262                         -1 AS year,
10263                         false as is_renewal
10264                 FROM
10265                         extend_reporter.legacy_circ_count
10266         )x GROUP BY 1, 3, 4
10267
10268                 </oils_persist:source_definition>
10269         <fields>
10270             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10271             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10272             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10273             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10274         </fields>
10275                 <links>
10276                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10277                 </links>
10278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10279                         <actions>
10280                                 <retrieve/>
10281                         </actions>
10282                 </permacrud>
10283     </class>
10284
10285         <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">
10286                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10287                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10288                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10289                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10290                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10291                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10292                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10293                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10294                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10295                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10296                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10297                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10298                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10299                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10300                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10301                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10302                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10303                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10304                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10305                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10306                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10307                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10308                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10309                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10310                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10311                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10312                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10313                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10314                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10315                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10316                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10317                 </fields>
10318                 <links>
10319                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10320                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10321                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10322                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10323                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10324                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10325                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10326                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10327                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10328                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10329                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10330                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10331                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10332                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10333                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10334                 </links>
10335         </class>
10336
10337     <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">
10338         <fields oils_persist:primary="id">
10339             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10340             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10341             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10342             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10343             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10344             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10345             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10346             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10347             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10348             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10349             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10350             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10351             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10352             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10353             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10354             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10355             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10356             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10357             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10358             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10359             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10360             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10361             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10362             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10363             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10364             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10365             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10366             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10367             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10368             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10369             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10370             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10371             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10372             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10373         </fields>
10374         <links>
10375             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10376             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10377             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10378             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10379             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10380         </links>
10381     </class>
10382
10383     <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">
10384         <fields oils_persist:primary="id">
10385             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10386             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10387             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10388             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10389         </fields>
10390         <links>
10391             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10392             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10393         </links>
10394     </class>
10395
10396     <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">
10397         <fields oils_persist:primary="owning_lib">
10398             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10399             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10400             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10401         </fields>
10402         <links>
10403             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10404         </links>
10405     </class>
10406
10407     <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">
10408         <fields oils_persist:primary="id">
10409             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10410             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10411             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10412             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10413             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10414         </fields>
10415         <links>
10416             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10417             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10418             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10419         </links>
10420     </class>
10421
10422     <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">
10423         <fields oils_persist:primary="circ_lib">
10424             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10425             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10426             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10427             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10428         </fields>
10429         <links>
10430             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10431             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10432         </links>
10433     </class>
10434
10435     <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">
10436         <fields oils_persist:primary="id">
10437             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10438             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10439             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10440             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10441             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10442         </fields>
10443         <links>
10444             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10445             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10446             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10447         </links>
10448     </class>
10449
10450     <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">
10451         <fields oils_persist:primary="home_ou">
10452             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10453             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10454             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10455             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10456         </fields>
10457         <links>
10458             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10459             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10460         </links>
10461     </class>
10462         <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">
10463                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10464                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10465                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10466                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10467                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10468                 </fields>
10469                 <links>
10470                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10471                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10472                 </links>
10473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10474                         <actions>
10475                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10476                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10477                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10478                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10479                         </actions>
10480                 </permacrud>
10481         </class>
10482         <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">
10483                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10484                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10485                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10486                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10487                 </fields>
10488                 <links>
10489                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10490                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10491                         </links>
10492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10493                 <actions>
10494                                 <create permission="ADMIN_ACQ_FUND_TAG">
10495                                         <context link="tag" field="owner"/>
10496                                 </create>
10497                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10498                                         <context link="tag" field="owner"/>
10499                                 </retrieve>
10500                                 <update permission="ADMIN_ACQ_FUND_TAG">
10501                                         <context link="tag" field="owner"/>
10502                                 </update>
10503                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10504                                         <context link="tag" field="owner"/>
10505                                 </delete>
10506                         </actions>
10507                 </permacrud>
10508         </class>
10509         <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">
10510                 <oils_persist:source_definition><![CDATA[
10511                 SELECT
10512                         poi.purchase_order AS purchase_order,
10513                         ii.invoice AS invoice,
10514                         NULL AS lineitem,
10515                         poi.id AS po_item,
10516                         NULL AS picklist
10517                 FROM
10518                         acq.po_item poi
10519                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10520                 UNION SELECT
10521                         jub.purchase_order AS purchase_order,
10522                         ie.invoice AS invoice,
10523                         jub.id AS lineitem,
10524                         NULL AS po_item,
10525                         jub.picklist AS picklist
10526                 FROM
10527                         acq.lineitem jub
10528                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10529                 UNION SELECT
10530                         ii.purchase_order AS purchase_order,
10531                         ii.invoice AS invoice,
10532                         NULL AS lineitem,
10533                         NULL AS po_item,
10534                         NULL AS picklist
10535                 FROM
10536                         acq.invoice_item ii
10537                 WHERE ii.po_item IS NULL
10538                 UNION SELECT
10539                         ie.purchase_order AS purchase_order,
10540                         ie.invoice AS invoice,
10541                         NULL AS lineitem,
10542                         NULL AS po_item,
10543                         NULL AS picklist
10544                 FROM
10545                         acq.invoice_entry ie
10546                 WHERE ie.lineitem IS NULL
10547                 UNION SELECT
10548                         NULL AS purchase_order,
10549                         NULL AS invoice,
10550                         jub.id AS lineitem,
10551                         NULL AS po_item,
10552                         jub.picklist AS picklist
10553                 FROM
10554                         acq.lineitem jub
10555                 WHERE jub.purchase_order IS NULL
10556                 ]]></oils_persist:source_definition>
10557                 <fields>
10558                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10559                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10560                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10561                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10562                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10563                 </fields>
10564                 <links>
10565                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10566                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10567                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10568                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10569                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10570                 </links>
10571         </class>
10572         <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">
10573                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10574                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10575                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10576                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10577                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10578                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10579                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10580                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10581                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10582                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10583                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10584                 </fields>
10585                 <links>
10586                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10587                 </links>
10588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10589                         <actions>
10590                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10591                                 <retrieve/>
10592                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10593                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10594                         </actions>
10595                 </permacrud>
10596         </class>
10597
10598         <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">
10599                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10600                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10601                         <field name="date_applied" reporter:datatype="timestamp"/>
10602                         <field name="org" reporter:datatype="org_unit"/>
10603                         <field name="original_value" reporter:datatype="text"/>
10604                         <field name="new_value" reporter:datatype="text"/>
10605                         <field name="field_name" reporter:datatype="link"/>
10606                 </fields>
10607                 <links>
10608                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10609                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10610                 </links>
10611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10612                         <actions>
10613                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10614                                 <retrieve/>
10615                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10616                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10617                         </actions>
10618                 </permacrud>
10619         </class>
10620         <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">
10621                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10622                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10623                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10624                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10625                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10626                 </fields>
10627                 <links>
10628                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10629                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10630                 </links>
10631         </class>
10632         <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">
10633                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10634                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10635                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10636                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10637                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10638                 </fields>
10639                 <links>
10640                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10641                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10642                 </links>
10643         </class>
10644
10645
10646         <!-- ********************************************************************************************************************* -->
10647
10648 </IDL>
10649
10650 <!--
10651     vim:noet:ts=4:sw=4:
10652 -->