]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
added missing bib_match.match_score field to IDL
[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
24 <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">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <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">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                 </fields>
152                 <links>
153                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
154                 </links>
155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
156                         <actions>
157                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
158                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
159                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
160                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
161                         </actions>
162                 </permacrud>
163         </class>
164
165         <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">
166                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
167                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
168                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
169                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
170                 </fields>
171                 <links>
172                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
173                 </links>
174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
175                         <actions>
176                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
177                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                         </actions>
181                 </permacrud>
182         </class>
183
184         <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">
185                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
186                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
187                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
188                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
189                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
190                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
191                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
192                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
193                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
194                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
195                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
196                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
197                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
198                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
199                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
200                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
201                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
202                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
203                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
204                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
205                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
206                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
207                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
208                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
209                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
210                 </fields>
211                 <links>
212                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
213                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
214                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
215                 </links>
216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
217                         <actions>
218                                 <create permission="CREATE_IMPORT_ITEM">
219                     <context link="definition" field="owner"/>
220                                 </create>
221                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
222                     <context link="definition" field="owner"/>
223                                 </retrieve>
224                                 <update permission="UPDATE_IMPORT_ITEM">
225                     <context link="definition" field="owner"/>
226                                 </update>
227                                 <delete permission="DELETE_IMPORT_ITEM">
228                     <context link="definition" field="owner"/>
229                                 </delete>
230                         </actions>
231                 </permacrud>
232         </class>
233
234         <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">
235                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
236                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
237                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
238                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
239                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
240                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
241                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
242                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
243                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
244                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
245                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
246                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
247                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
248                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
249                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
250                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
251                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
252                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
253                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
254                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
255                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
256                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
257                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
258                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
259                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
260                 </fields>
261                 <links>
262                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
263                 </links>
264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
265                         <actions>
266                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
267                                 <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"/>
268                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
269                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
270                         </actions>
271                 </permacrud>
272         </class>
273
274         <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">
275                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
276                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
277                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
278                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
279                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
280                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
281                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
282                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
283                 </fields>
284                 <links>
285                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
286                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
287                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
288                 </links>
289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
290                         <actions>
291                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
292                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
293                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
294                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
295                         </actions>
296                 </permacrud>
297         </class>
298
299         <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">
300                 <fields oils_persist:primary="code">
301                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
302                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
303                 </fields>
304                 <links>
305                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
306                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
307                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
308                 </links>
309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
310                         <actions>
311                                 <retrieve/>
312                         </actions>
313                 </permacrud>
314         </class>
315
316         <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">
317                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
318                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
319                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
320                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
321                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
322                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
323                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
324                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
325                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
326                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
327                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
328                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
329                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
330                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
331                 </fields>
332                 <links>
333                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
334                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
335                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
336                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
337             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
338             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
339             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
340                 </links>
341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
342                         <actions>
343                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
344                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
345                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
346                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
347                         </actions>
348                 </permacrud>
349         </class>
350
351         <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">
352                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
353                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
354                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
356                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
357                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
358                 </fields>
359                 <links/>
360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
361                         <actions>
362                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
363                 <retrieve/>
364                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
365                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
366                         </actions>
367                 </permacrud>
368         </class>
369
370         <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">
371                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
372                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
373                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
374                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
375                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
376                 </fields>
377                 <links>
378                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
379                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
380                 </links>
381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
382                         <actions>
383                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
387                         </actions>
388                 </permacrud>
389         </class>
390
391         <class id="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">
392                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
393                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
394                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
395                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
396                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
397                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
398                 </fields>
399                 <links>
400                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
401                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
402                 </links>
403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
404                         <actions>
405                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
406                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
407                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
408                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
409                         </actions>
410                 </permacrud>
411         </class>
412
413         <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">
414                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
415                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
416                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
417                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
418                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
419                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
420                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
421                 </fields>
422                 <links>
423                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
424                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
425                 </links>
426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
427                         <actions>
428                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
429                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
431                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
432                         </actions>
433                 </permacrud>
434         </class>
435
436         <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">
437                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
438                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
439                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
440                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
441                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
442                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
443                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
444                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
445                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
446                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
447                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
448                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
449                 </fields>
450                 <links>
451                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
452                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
453                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
454             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
455             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
456                 </links>
457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
458                         <actions>
459                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
460                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
461                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
462                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
463                         </actions>
464                 </permacrud>
465         </class>
466
467         <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">
468                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
469                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
470                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
471                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
472                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
473                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
474                 </fields>
475                 <links/>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
479                 <retrieve/>
480                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
481                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <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">
487                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
488                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
489                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
490                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
491                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
492                 </fields>
493                 <links>
494                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
495                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
500                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
501                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
502                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
503                         </actions>
504                 </permacrud>
505         </class>
506
507         <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">
508                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
509                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
510                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
511                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
512                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
513                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
514                 </fields>
515                 <links>
516                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
517                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
518                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
519                 </links>
520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
521                         <actions>
522                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                         </actions>
527                 </permacrud>
528         </class>
529
530         <class id="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">
531                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
532                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
533                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
534                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
535                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
536                 </fields>
537                 <links>
538                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
539                 </links>
540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
541                         <actions>
542                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
543                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
544                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
545                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
546                         </actions>
547                 </permacrud>
548         </class>
549
550         <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">
551                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
552                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
553                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
554                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
555                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
556                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
557                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
558                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
559             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
560                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
561                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
562                 </fields>
563                 <links>
564                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
565                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
566                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
567                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="ADMIN_IMPORT_MATCH_SET">
572                     <context link="match_set" field="owner"/>
573                                 </create>
574                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
575                     <context link="match_set" field="owner"/>
576                                 </retrieve>
577                                 <update permission="ADMIN_IMPORT_MATCH_SET">
578                     <context link="match_set" field="owner"/>
579                                 </update>
580                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
581                     <context link="match_set" field="owner"/>
582                                 </delete>
583                         </actions>
584                 </permacrud>
585         </class>
586
587         <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">
588                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
589                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
590                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
591                         <field reporter:label="Coded Field" name="svf" reporter:datatype="text"/>
592                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
593                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
594                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
595                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
596                 </fields>
597                 <links>
598                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
599                 </links>
600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
601                         <actions>
602                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
603                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
604                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
605                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
606                         </actions>
607                 </permacrud>
608         </class>
609
610         <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">
611                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
612                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
613                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
614                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
615                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
616                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
617                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
618                 </fields>
619                 <links>
620                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
621                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
622                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
623                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
624                 </links>
625         </class>
626
627     <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">
628         <fields oils_persist:primary="name">
629             <field reporter:label="Name" name="name" reporter:datatype="text"/>
630             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
631             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
632             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
633         </fields>
634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
635             <actions>
636                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
637                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
638                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
639                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
640             </actions>
641         </permacrud>
642     </class>
643
644     <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">
645         <fields oils_persist:primary="id">
646             <field reporter:label="ID" name="id" reporter:datatype="id"/>
647             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
648             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
649             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
650             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
651         </fields>
652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
653             <actions>
654                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
655                 <retrieve/>
656                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
657                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
658             </actions>
659         </permacrud>
660     </class>
661
662         <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">
663                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
664                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
665                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
666                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
667                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
668                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
669                 </fields>
670                 <links>
671                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
672                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
673                 </links>
674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
675             <actions>
676                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
677                 <retrieve/>
678                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
679                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
680             </actions>
681         </permacrud>
682         </class>
683
684         <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">
685                 <fields oils_persist:primary="name">
686                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
687                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
688                         <field reporter:label="Description" name="description" reporter:datatype="text" />
689                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
690                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
691                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
692                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
693                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
694                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
695                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
696                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
697                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
698                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
699                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
700                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
701                 </fields>
702                 <links>
703                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
704                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
705                 </links>
706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
707             <actions>
708                 <create permission="ADMIN_SVF" global_required="true"/>
709                 <retrieve/>
710                 <update permission="ADMIN_SVF" global_required="true"/>
711                 <delete permission="ADMIN_SVF" global_required="true"/>
712             </actions>
713         </permacrud>
714         </class>
715
716         <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">
717                 <fields oils_persist:primary="id">
718                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
719                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
720                 </fields>
721                 <links>
722                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
723                 </links>
724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
725             <actions>
726                 <retrieve/>
727             </actions>
728         </permacrud>
729         </class>
730
731         <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">
732                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
733                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
734                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
735                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
736                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
737                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
738                 </fields>
739                 <links>
740                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
741                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
742                 </links>
743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
744             <actions>
745                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
746                 <retrieve/>
747                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
748                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
749             </actions>
750         </permacrud>
751         </class>
752
753         <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">
754                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
755                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
756                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
757                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
758                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
759                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
760                 </fields>
761                 <links>
762                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
763                 </links>
764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
765             <actions>
766                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
767                 <retrieve/>
768                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
769                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
770             </actions>
771         </permacrud>
772         </class>
773
774         <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">
775                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
776                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
777                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
778                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
779                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
780                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
781                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
782                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
783                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
784                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
785                 </fields>
786                 <links>
787                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
788                 </links>
789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790             <actions>
791                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
792                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
793                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
794                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
795             </actions>
796         </permacrud>
797         </class>
798
799     <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">
800         <fields oils_persist:primary="name">
801             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
802             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
803             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
804             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
805             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
806             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
807             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
808             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
809             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
810         </fields>
811         <links>
812             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
813         </links>
814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
815             <actions>
816                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
817                 <retrieve/>
818                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
819                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
820             </actions>
821         </permacrud>
822     </class>
823
824     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
825         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
826             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
827             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
828             <field reporter:label="Name" name="name" reporter:datatype="text"/>
829             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
830             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
831             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
832             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
833         </fields>
834         <links>
835             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
836         </links>
837     </class>
838
839         <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">
840                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
841                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
842                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
843                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
844                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
845                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
846                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
847                 </fields>
848                 <links>
849             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
850             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
851                 </links>
852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
853                         <actions>
854                                 <retrieve/>
855                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
856                         </actions>
857                 </permacrud>
858         </class>
859
860         <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">
861                 <fields oils_persist:primary="key">
862                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
863                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
864                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
865                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
866                 </fields>
867                 <links/>
868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
869                         <actions>
870                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
871                                 <retrieve/>
872                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
873                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
874                         </actions>
875                 </permacrud>
876         </class>
877
878         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
879                 <fields oils_persist:primary="module">
880                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
881                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
882                 </fields>
883                 <links/>
884         </class>
885
886         <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">
887                 <fields oils_persist:primary="module">
888                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
889                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
890                 </fields>
891                 <links/>
892                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
893                         <actions>
894                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
895                                 <retrieve/>
896                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
897                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
898                         </actions>
899                 </permacrud>
900         </class>
901
902         <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">
903                 <fields oils_persist:primary="module">
904                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
905                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
906                 </fields>
907                 <links/>
908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
909                         <actions>
910                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
911                                 <retrieve/>
912                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
913                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
914                         </actions>
915                 </permacrud>
916         </class>
917
918         <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">
919                 <fields oils_persist:primary="module">
920                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
921                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
922                 </fields>
923                 <links/>
924                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
925                         <actions>
926                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
927                                 <retrieve/>
928                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
929                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
930                         </actions>
931                 </permacrud>
932         </class>
933
934         <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">
935                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
936                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
937                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
938                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
939                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
940                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
941                 </fields>
942                 <links>
943                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
944                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
945                 </links>
946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
947                         <actions>
948                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
949                     <context link="event_def" field="owner"/>
950                 </create>
951                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
952                     <context link="event_def" field="owner"/>
953                 </retrieve>
954                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
955                     <context link="event_def" field="owner"/>
956                 </update>
957                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
958                     <context link="event_def" field="owner"/>
959                 </delete>
960                         </actions>
961                 </permacrud>
962         </class>
963
964         <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">
965                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
966                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
967                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
968                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
969                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
970                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
971                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
972                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
973                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
974                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
975                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
976                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
977                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
978                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
979                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
980                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
981                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
982                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
983                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
984                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
985                 </fields>
986                 <links>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
989                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
990                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
991                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
992                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
993                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
994                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
995                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
996                 </links>
997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
998                         <actions>
999                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1000                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1001                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1002                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1003                         </actions>
1004                 </permacrud>
1005         </class>
1006
1007         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1008                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1009                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1010                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1011                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1012                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1013                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1014                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1015                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1016                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1017                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1018                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1019                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1020                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1021                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1022                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1023                 </fields>
1024                 <links>
1025                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1026                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1027                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1028                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1029                 </links>
1030         </class>
1031
1032         <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">
1033                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1034                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1035                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1036                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1037                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1038                 </fields>
1039                 <links>
1040                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1041                 </links>
1042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1043                         <actions>
1044                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1045                     <context link="event_def" field="owner"/>
1046                 </create>
1047                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1048                     <context link="event_def" field="owner"/>
1049                 </retrieve>
1050                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1051                     <context link="event_def" field="owner"/>
1052                 </update>
1053                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1054                     <context link="event_def" field="owner"/>
1055                 </delete>
1056                         </actions>
1057                 </permacrud>
1058         </class>
1059
1060         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1061                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1062                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1063                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1064                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1065                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1066                 </fields>
1067                 <links>
1068                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1069                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1070                 </links>
1071         </class>
1072
1073         <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">
1074                 <fields oils_persist:primary="code">
1075                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1076                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1077                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1078                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1079                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1080                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1081                 </fields>
1082                 <links/>
1083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1084             <actions>
1085                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1086                 <retrieve/>
1087                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1088                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1089             </actions>
1090         </permacrud>
1091         </class>
1092
1093         <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">
1094                 <fields oils_persist:primary="code">
1095                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1096                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1097                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1098                 </fields>
1099                 <links/>
1100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1101             <actions>
1102                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1103                 <retrieve/>
1104                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1105                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1106             </actions>
1107         </permacrud>
1108         </class>
1109
1110         <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">
1111                 <fields oils_persist:primary="code">
1112                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1113                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1114                 </fields>
1115                 <links/>
1116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1117             <actions>
1118                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1119                 <retrieve/>
1120                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1121                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1122             </actions>
1123         </permacrud>
1124         </class>
1125
1126         <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">
1127                 <fields oils_persist:primary="code">
1128                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1129                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1130                 </fields>
1131                 <links/>
1132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1133             <actions>
1134                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1135                 <retrieve/>
1136                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1137                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1138             </actions>
1139         </permacrud>
1140         </class>
1141
1142         <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">
1143                 <fields oils_persist:primary="code">
1144                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1145                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1146                 </fields>
1147                 <links/>
1148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1149             <actions>
1150                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1151                 <retrieve/>
1152                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1153                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1154             </actions>
1155         </permacrud>
1156         </class>
1157
1158         <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">
1159                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1160                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1161                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1162                 </fields>
1163                 <links/>
1164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1165             <actions>
1166                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1167                 <retrieve/>
1168                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1169                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1170             </actions>
1171         </permacrud>
1172         </class>
1173
1174         <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">
1175                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1176                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1177                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1178                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1179                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1180                 </fields>
1181         <links>
1182             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1183             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1184             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1185         </links>
1186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1187             <actions>
1188                 <create permission="UPDATE_COPY">
1189                     <context link="target_copy" field="circ_lib"/>
1190                 </create>
1191                 <retrieve/>
1192                 <update permission="UPDATE_COPY">
1193                     <context link="target_copy" field="circ_lib"/>
1194                 </update>
1195                 <delete permission="UPDATE_COPY">
1196                     <context link="target_copy" field="circ_lib"/>
1197                 </delete>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <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">
1203                 <fields oils_persist:primary="code">
1204                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1205                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1206                 </fields>
1207                 <links/>
1208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1209             <actions>
1210                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1211                 <retrieve/>
1212                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1213                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1214             </actions>
1215         </permacrud>
1216         </class>
1217
1218         <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">
1219                 <fields oils_persist:primary="code">
1220                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1221                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1222                 </fields>
1223                 <links/>
1224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1225             <actions>
1226                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1227                 <retrieve/>
1228                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1229                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1230             </actions>
1231         </permacrud>
1232         </class>
1233
1234         <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">
1235                 <fields oils_persist:primary="code">
1236                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1237                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1238                 </fields>
1239                 <links/>
1240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1241             <actions>
1242                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1243                 <retrieve/>
1244                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1245                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1246             </actions>
1247         </permacrud>
1248         </class>
1249
1250     <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">
1251         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1252             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1253             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1254             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1255             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1256             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1257             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1258             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1259             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1260             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1261             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1262             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1263             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1264             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1265             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1266             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1267         </fields>
1268         <links/>
1269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1270             <actions>
1271                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1272                 <retrieve/>
1273                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1274                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1275             </actions>
1276         </permacrud>
1277     </class>
1278
1279     <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">
1280         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1281             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1282             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1283             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1284             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1285             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1286             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1287             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1288             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1289             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1290             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1291             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1292             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1293             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1294             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1295             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1296         </fields>
1297         <links/>
1298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1299             <actions>
1300                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1301                 <retrieve/>
1302                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1303                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1304             </actions>
1305         </permacrud>
1306     </class>
1307
1308     <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">
1309         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1310             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1311             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1312             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1313             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1314             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1315         </fields>
1316         <links>
1317             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1318             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1319             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1320         </links>
1321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1322             <actions>
1323                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1324                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1325                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1326                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1327             </actions>
1328         </permacrud>
1329     </class>
1330
1331         <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">
1332                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1333                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1334                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1335                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1336                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1337                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1338                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1339                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1340                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1341                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1342                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1343                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1344                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1345                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1346                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1347                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1348                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1349             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1350                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1351                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1352                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1353                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1354                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1355                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1356                 </fields>
1357                 <links>
1358                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1359                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1360                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1361                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1362                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1363                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1364                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1365                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1366                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1367                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1368                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1369                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1370                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1371             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1372                 </links>
1373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1374             <actions>
1375                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1376                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1377                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1378                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1379             </actions>
1380         </permacrud>
1381         </class>
1382
1383         <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">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1385                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1387                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1388                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1389                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1390                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1391                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1392                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1393                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1394                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1395                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1396                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1397                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1398                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1399             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1400                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1401                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1402             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1403                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1404                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1405                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1406                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1407             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1408             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1409             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1410                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1411                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1412                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1413                 </fields>
1414                 <links>
1415                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1416                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1417                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1418                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1419                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1420                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1421                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1422                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1423                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1424                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1425                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1426                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1427                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1428             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1429                 </links>
1430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1431             <actions>
1432                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1433                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1434                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1435                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1436             </actions>
1437         </permacrud>
1438         </class>
1439
1440         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1441                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1442                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1443                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1444                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1445                 </fields>
1446                 <links>
1447                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1448                 </links>
1449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1450             <actions>
1451                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1452                     <context link="matchpoint" field="org_unit"/>
1453                 </create>
1454                 <retrieve/>
1455                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1456                     <context link="matchpoint" field="org_unit"/>
1457                 </update>
1458                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1459                     <context link="matchpoint" field="org_unit"/>
1460                 </delete>
1461             </actions>
1462         </permacrud>
1463         </class>
1464
1465         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1466                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1467                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1468                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1469                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1470                 </fields>
1471                 <links>
1472                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1473                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1474                 </links>
1475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1476             <actions>
1477                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1478                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1479                 </create>
1480                 <retrieve/>
1481                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1482                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1483                 </update>
1484                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1485                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1486                 </delete>
1487             </actions>
1488         </permacrud>
1489         </class>
1490
1491         <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">
1492                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1493                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1494                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1495                 </fields>
1496                 <links/>
1497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1498             <actions>
1499                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1500                 <retrieve/>
1501                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1502                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1503             </actions>
1504         </permacrud>
1505         </class>
1506
1507         <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">
1508                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1509                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1510                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1511                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1512                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1513                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1514                 </fields>
1515                 <links>
1516                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1517                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1518                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1519                 </links>
1520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1521             <actions>
1522                 <create permission="ADMIN_SURVEY">
1523                     <context link="survey" field="owner"/>
1524                 </create>
1525                 <retrieve/>
1526                 <update permission="ADMIN_SURVEY">
1527                     <context link="survey" field="owner"/>
1528                 </update>
1529                 <delete permission="ADMIN_SURVEY">
1530                     <context link="survey" field="owner"/>
1531                 </delete>
1532             </actions>
1533         </permacrud>
1534         </class>
1535         <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">
1536                 <fields oils_persist:primary="id" oils_persist:sequence="">
1537                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1538                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1539                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1540                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1541                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1542                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1543                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1544                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1545                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1546                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1547                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1548                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1549                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1550                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1551                 </fields>
1552                 <links>
1553                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1554                 </links>
1555         </class>
1556         <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">
1557                 <fields oils_persist:primary="id" oils_persist:sequence="">
1558                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1559                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1560                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1561                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1562                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1563                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1564                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1565                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1566                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1567                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1568                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1569                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1570                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1571                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1572                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1573                 </fields>
1574                 <links>
1575                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1576                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1577                 </links>
1578         </class>
1579         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1580                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1581                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1582                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1583                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1584                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1585                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1586                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1587                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1588                 </fields>
1589                 <links>
1590                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1591                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1592                 </links>
1593         </class>
1594         <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">
1595                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1596                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1597                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1598                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1599                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1600                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1601                 </fields>
1602                 <links>
1603                         <link field="usr" reltype="has_a" key="id" class="au"/>
1604                 </links>
1605         </class>
1606         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1607                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1608                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1609                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1610                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1611                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1612                 </fields>
1613                 <links>
1614                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1615                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1616                 </links>
1617         </class>
1618         <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">
1619                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1620                         <field name="field" reporter:datatype="link"/>
1621                         <field name="id" reporter:datatype="id" />
1622                         <field name="source" reporter:datatype="link"/>
1623                         <field name="value" reporter:datatype="text"/>
1624                 </fields>
1625                 <links>
1626                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1627                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1628                 </links>
1629         </class>
1630         <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">
1631                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1632                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1633                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1634                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1635                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1636                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1637                 </fields>
1638                 <links>
1639                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1640                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1641                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1642                 </links>
1643         </class>
1644         <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">
1645                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1646                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1647                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1648                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1649                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1650                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1651                 </fields>
1652                 <links>
1653                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1654                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1655                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1656                 </links>
1657         </class>
1658         <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">
1659                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1660                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1661                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1662                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1663                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1664                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1665                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1666                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1667                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1668                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1669                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1670                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1671                 </fields>
1672                 <links>
1673                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1674                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1675                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1676                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1677                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1678                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1679                 </links>
1680         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1681             <actions>
1682                 <create permission="TRANSIT_COPY" context_field="owner">
1683                     <context link="target_copy" field="circ_lib"/>
1684                 </create>
1685                 <retrieve/>
1686                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1687                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1688             </actions>
1689         </permacrud>
1690         </class>
1691         <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">
1692                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1693                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1694                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1695                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1696                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1697                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1698                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1699                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1700                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1701                 </fields>
1702                 <links>
1703                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1704                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1705                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1706                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1707                 </links>
1708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1709             <actions>
1710                 <create permission="ADMIN_SURVEY">
1711                     <context link="survey" field="owner"/>
1712                 </create>
1713                 <retrieve/>
1714                 <update permission="ADMIN_SURVEY">
1715                     <context link="survey" field="owner"/>
1716                 </update>
1717                 <delete permission="ADMIN_SURVEY">
1718                     <context link="survey" field="owner"/>
1719                 </delete>
1720             </actions>
1721         </permacrud>
1722         </class>
1723         <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">
1724                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1725                         <field name="bucket" />
1726                         <field name="id" reporter:datatype="id" />
1727                         <field name="target_copy" reporter:datatype="link"/>
1728                         <field name="create_time" reporter:datatype="timestamp" />
1729                         <field name="pos" reporter:datatype="int" />
1730                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1731                 </fields>
1732                 <links>
1733                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1734                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1735             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1736                 </links>
1737         </class>
1738         <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">
1739                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1740                         <field name="id" reporter:datatype="id" />
1741                         <field name="item" reporter:datatype="link"/>
1742                         <field name="note" reporter:datatype="text" />
1743                 </fields>
1744                 <links>
1745                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1746                 </links>
1747         </class>
1748         <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">
1749                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1750                         <field name="active" reporter:datatype="bool"/>
1751                         <field name="create_date" reporter:datatype="timestamp"/>
1752                         <field name="creator" />
1753                         <field name="deleted" reporter:datatype="bool"/>
1754                         <field name="edit_date" reporter:datatype="timestamp"/>
1755                         <field name="editor" />
1756                         <field name="id" reporter:datatype="id" />
1757                         <field name="last_xact_id" />
1758                         <field name="marc" />
1759                         <field name="source" />
1760                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1761                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1762                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1763                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1764                 </fields>
1765                 <links>
1766                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1767                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1768                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1769                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1770                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1771                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1772                 </links>
1773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1774                         <actions>
1775                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1776                                 <retrieve/>
1777                                 <update permission="UPDATE_MARC" global_required="true"/>
1778                                 <delete permission="UPDATE_MARC" global_required="true"/>
1779                         </actions>
1780                 </permacrud>
1781         </class>
1782         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1783                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1784                         <field name="char_encoding" />
1785                         <field name="id" />
1786                         <field name="record" />
1787                         <field name="record_status" />
1788                 </fields>
1789                 <links>
1790                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1791                 </links>
1792         </class>
1793         <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">
1794                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1795                         <field name="id" reporter:datatype="id" />
1796                         <field name="bib" reporter:datatype="link" />
1797                         <field name="authority" reporter:datatype="link" />
1798                 </fields>
1799                 <links>
1800                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1801                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1802                 </links>
1803         </class>
1804         <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">
1805                 <fields oils_persist:primary="code" oils_persist:sequence="">
1806                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1807                         <field reporter:label="Language" name="value" 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="CREATE_MARC_CODE" global_required="true"/>
1813                 <retrieve/>
1814                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1815                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1816             </actions>
1817         </permacrud>
1818         </class>
1819         <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">
1820                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1821                         <field name="accepting_usr" />
1822                         <field name="amount" reporter:datatype="money" />
1823                         <field name="amount_collected" reporter:datatype="money" />
1824                         <field name="approval_code" reporter:datatype="text"/>
1825                         <field name="cash_drawer" reporter:datatype="link"/>
1826                         <field name="cc_first_name" reporter:datatype="text"/>
1827                         <field name="cc_last_name" reporter:datatype="text"/>
1828                         <field name="cc_number" reporter:datatype="text"/>
1829                         <field name="cc_order_number" reporter:datatype="text"/>
1830                         <field name="cc_type" reporter:datatype="text"/>
1831                         <field name="cc_processor" reporter:datatype="text"/>
1832                         <field name="expire_month" reporter:datatype="int" />
1833                         <field name="expire_year" reporter:datatype="int" />
1834                         <field name="id" reporter:datatype="id" />
1835                         <field name="note" reporter:datatype="text"/>
1836                         <field name="payment_ts" reporter:datatype="timestamp"/>
1837                         <field name="xact" reporter:datatype="link"/>
1838                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1839                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1840                 </fields>
1841                 <links>
1842                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1843                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1844                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1845                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1846                 </links>
1847         </class>
1848         <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">
1849                 <fields oils_persist:primary="name">
1850                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1851                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1852                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1853                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1854                 </fields>
1855                 <links/>
1856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1857             <actions>
1858                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1859                 <retrieve/>
1860                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1861                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1862             </actions>
1863         </permacrud>
1864         </class>
1865
1866         <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">
1867                 <fields oils_persist:primary="alias">
1868                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1869                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1870                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1871                 </fields>
1872                 <links>
1873                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1874                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1875                 </links>
1876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1877             <actions>
1878                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1879                 <retrieve/>
1880                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1881                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1882             </actions>
1883         </permacrud>
1884         </class>
1885
1886         <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">
1887                 <fields oils_persist:primary="name">
1888                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1889                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1890                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1891                 </fields>
1892                 <links>
1893                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1894                 </links>
1895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1896             <actions>
1897                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1898                 <retrieve/>
1899                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1900                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1901             </actions>
1902         </permacrud>
1903         </class>
1904
1905         <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">
1906                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1907                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1908                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1909                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1910                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1911                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1912                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1913                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1914                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1915                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1916                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1917                 </fields>
1918                 <links>
1919                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1920                 </links>
1921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1922             <actions>
1923                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1924                 <retrieve/>
1925                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1926                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1927             </actions>
1928         </permacrud>
1929         </class>
1930         <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">
1931                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1932                         <field name="id" reporter:datatype="id" />
1933                         <field name="name" reporter:datatype="text"/>
1934                         <field name="xpath" reporter:datatype="text"/>
1935                         <field name="format" reporter:datatype="link"/>
1936                         <field name="first_word" reporter:datatype="bool" />
1937                 </fields>
1938                 <links/>
1939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1940             <actions>
1941                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1942                 <retrieve/>
1943                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1944                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1945             </actions>
1946         </permacrud>
1947         </class>
1948         <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">
1949                 <fields oils_persist:primary="code" oils_persist:sequence="">
1950                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1952                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1953                 </fields>
1954                 <links/>
1955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1956             <actions>
1957                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1958                 <retrieve/>
1959                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1960                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1961             </actions>
1962         </permacrud>
1963         </class>
1964         <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">
1965                 <fields oils_persist:primary="code" oils_persist:sequence="">
1966                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1967                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1968                 </fields>
1969                 <links/>
1970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1971             <actions>
1972                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1973                 <retrieve/>
1974                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1975                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1976             </actions>
1977         </permacrud>
1978         </class>
1979     <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">
1980         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1981             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1982             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1983             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1984             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1985         </fields>
1986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1987             <actions>
1988                 <retrieve/>
1989             </actions>
1990         </permacrud>
1991     </class>
1992         <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">
1993                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
1994                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1995                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1996                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
1997                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1998                 </fields>
1999                 <links>
2000                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2001                 </links>
2002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2003             <actions>
2004                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2005                 <retrieve/>
2006                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2007                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2008             </actions>
2009         </permacrud>
2010         </class>
2011         <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">
2012                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2013                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2014                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2015                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2016                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2017                 </fields>
2018                 <links>
2019                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2020                 </links>
2021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022             <actions>
2023                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2024                 <retrieve/>
2025                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2026                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2027             </actions>
2028         </permacrud>
2029         </class>
2030         <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">
2031                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2032                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2033                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2034                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2035                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2036                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2037                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2038                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2039                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2040                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2041                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2042                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2043                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2044                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2045                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2046                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2047                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2048                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2049                 </fields>
2050                 <links>
2051                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2052                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2053                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2054                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2055                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2056                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2057                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2058                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2059                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2060                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2061                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2062                 </links>
2063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2064             <actions>
2065                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2066                 <retrieve/>
2067                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2068                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2069             </actions>
2070         </permacrud>
2071         </class>
2072         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2073                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2074                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2075                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2076                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2077                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2078                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2079                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2080                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2081                 </fields>
2082                 <links>
2083                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2084                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2085         </links>
2086         </class>
2087         <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">
2088                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2089                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2090                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2091                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2092                 </fields>
2093                 <links>
2094                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2095                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2096                 </links>
2097         </class>
2098         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2099                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2100                         <field name="id" reporter:datatype="id" />
2101                         <field name="value" oils_persist:i18n="true" />
2102                 </fields>
2103                 <links/>
2104         </class>
2105         <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">
2106                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2107                         <field name="balance_owed" reporter:datatype="money" />
2108                         <field name="total_owed" reporter:datatype="money" />
2109                         <field name="total_paid" reporter:datatype="money" />
2110                         <field name="usr" reporter:datatype="link"/>
2111                 </fields>
2112                 <links>
2113                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2114         </links>
2115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2116             <actions>
2117                 <retrieve permission="VIEW_USER">
2118                     <context link="usr" field="home_ou"/>
2119                 </retrieve>
2120             </actions>
2121         </permacrud>
2122         </class>
2123         <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">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2125                         <field name="collector" />
2126                         <field name="enter_time" reporter:datatype="timestamp"/>
2127                         <field name="id" reporter:datatype="id" />
2128                         <field name="location" reporter:datatype="link"/>
2129                         <field name="usr" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2133                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2134                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="money.collections_tracker.create" context_field="location"/>
2139                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2140                 <delete permission="money.collections_tracker.create" context_field="location"/>
2141             </actions>
2142         </permacrud>
2143         </class>
2144         <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">
2145                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2146                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2147                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2148                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2149                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2150                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2151                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2152                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2153                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2154                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2155                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2156                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2157                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2158                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2159                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2160                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2161                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2162                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2163                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2164                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2165                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2166                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2167                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2168                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2169                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2170                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2172                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2173                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2174                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2175                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2176                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2177                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2178                 </fields>
2179                 <links>
2180                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2181                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2182                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2183                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2184                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2185                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2186                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2187                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2188                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2189                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2190                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2191                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2192                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2193                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2194                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2195                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2196                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2197                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2198                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2199                 </links>
2200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2201             <actions>
2202                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2203                 <retrieve/>
2204                 <update permission="UPDATE_MARC" global_required="true"/>
2205             </actions>
2206         </permacrud>
2207         </class>
2208         <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">
2209                 <fields oils_persist:primary="id">
2210                         <field name="dow_0_close" />
2211                         <field name="dow_0_open" />
2212                         <field name="dow_1_close" />
2213                         <field name="dow_1_open" />
2214                         <field name="dow_2_close" />
2215                         <field name="dow_2_open" />
2216                         <field name="dow_3_close" />
2217                         <field name="dow_3_open" />
2218                         <field name="dow_4_close" />
2219                         <field name="dow_4_open" />
2220                         <field name="dow_5_close" />
2221                         <field name="dow_5_open" />
2222                         <field name="dow_6_close" />
2223                         <field name="dow_6_open" />
2224                         <field name="id" reporter:datatype="id" />
2225                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2226                 </fields>
2227                 <links>
2228                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2229                 </links>
2230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2231             <actions>
2232                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2233                 <retrieve/>
2234                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2235                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2236             </actions>
2237         </permacrud>
2238         </class>
2239         <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">
2240                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2241                         <field name="id" reporter:datatype="id" />
2242                         <field name="record" reporter:datatype="link"/>
2243                         <field name="label" reporter:datatype="text"/>
2244                         <field name="label_sortkey" reporter:datatype="text"/>
2245                 </fields>
2246                 <links>
2247                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2248                 </links>
2249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2250             <actions>
2251                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2252                 <retrieve/>
2253                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2254                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2255             </actions>
2256         </permacrud>
2257         </class>
2258         <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">
2259                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2260                         <field name="id" reporter:datatype="id" />
2261                         <field name="target_copy" reporter:datatype="link" />
2262                         <field name="part" reporter:datatype="link"/>
2263                 </fields>
2264                 <links>
2265                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2266                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2267                 </links>
2268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2269             <actions>
2270                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2271                 <retrieve/>
2272                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2273                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2274             </actions>
2275         </permacrud>
2276         </class>
2277         <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">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2279                         <field name="close_end" reporter:datatype="timestamp" />
2280                         <field name="close_start" reporter:datatype="timestamp" />
2281                         <field name="id" reporter:datatype="id" />
2282                         <field name="org_unit" reporter:datatype="org_unit"/>
2283                         <field name="reason" reporter:datatype="text"/>
2284                 </fields>
2285                 <links>
2286                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2287                 </links>
2288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2289             <actions>
2290                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2291                 <retrieve/>
2292                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2293                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2294             </actions>
2295         </permacrud>
2296         </class>
2297         <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">
2298                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2299                         <field name="extended" reporter:datatype="interval"/>
2300                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2301                         <field name="max_renewals" reporter:datatype="int" />
2302                         <field name="name" reporter:datatype="text"/>
2303                         <field name="normal" reporter:datatype="interval"/>
2304                         <field name="shrt" reporter:datatype="interval"/>
2305                 </fields>
2306                 <links>
2307                 </links>
2308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2309             <actions>
2310                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2311                 <retrieve/>
2312                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2313                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2314             </actions>
2315         </permacrud>
2316         </class>
2317
2318         <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">
2319                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2320                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2321                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2322             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2323                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2324             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2325                 </fields>
2326                 <links>
2327             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2328                 </links>
2329                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2330             <actions>
2331                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2332                 <retrieve/>
2333                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2334                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2335             </actions>
2336                 </permacrud>
2337         </class>
2338
2339         <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">
2340                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2341                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2342                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2343                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2344             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2345                 </fields>
2346                 <links>
2347                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2348                 </links>
2349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2350             <actions>
2351                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2352                 <retrieve/>
2353                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2354                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2355             </actions>
2356                 </permacrud>
2357         </class>
2358
2359         <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">
2360                 <fields oils_persist:primary="id" oils_persist:sequence="">
2361                         <field name="balance_owed" reporter:datatype="money"/>
2362                         <field name="id" reporter:datatype="id" />
2363                         <field name="last_billing_note" reporter:datatype="text"/>
2364                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2365                         <field name="last_billing_type" reporter:datatype="text"/>
2366                         <field name="last_payment_note" reporter:datatype="text"/>
2367                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2368                         <field name="last_payment_type" reporter:datatype="text"/>
2369                         <field name="total_owed" reporter:datatype="money"/>
2370                         <field name="total_paid" reporter:datatype="money"/>
2371                         <field name="usr" reporter:datatype="link"/>
2372                         <field name="xact_finish" reporter:datatype="timestamp" />
2373                         <field name="xact_start" reporter:datatype="timestamp" />
2374                         <field name="xact_type" reporter:datatype="text"/>
2375                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2376                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2377                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2378                         <field name="billing_location" reporter:datatype="link"/>
2379                 </fields>
2380                 <links>
2381                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2382                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2383                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2384                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2385                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2386                 </links>
2387         </class>
2388         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2389                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2390                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2391                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2392                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2393                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2394                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2395                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2396                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2397                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2398                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2399                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2400                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2401                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2402                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2403                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2404                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2405                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2406                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2407                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2408                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2409                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2410                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2411                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2412                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2413                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2414                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2415                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2416                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2417                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2418                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2419                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2420                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2421                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2422                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2423                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2424                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2425                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2426                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2427                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2428                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2429                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2430                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2431                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2432                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2433                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2434                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2435                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2436                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2437                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2438                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2439                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2440                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2441                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2442                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2443                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2444                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2445                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2446                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2447                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2448                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2449                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2450                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2451                 </fields>
2452                 <links>
2453                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2454                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2455                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2456                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2457                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2458                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2459                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2460                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2461                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2462                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2463                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2464                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2465                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2466                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2467                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2468                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2469                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2470                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2471                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2472                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2473                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2474                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2475                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2476                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2477                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2478                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2479                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2480                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2481                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2482                 </links>
2483         </class>
2484
2485         <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">
2486                 <fields oils_persist:primary="name">
2487                         <field name="name" reporter:datatype="text"/>
2488                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2489                 </fields>
2490                 <links/>
2491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2492                         <actions>
2493                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2494                                 <retrieve/>
2495                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2496                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2497                         </actions>
2498                 </permacrud>
2499         </class>
2500         <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">
2501                 <fields oils_persist:primary="name">
2502                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2503                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2504                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2505                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2506                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2507                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2508                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2509                 </fields>
2510                 <links>
2511                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2512                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2513                 </links>
2514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2515                         <actions>
2516                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2517                                 <retrieve/>
2518                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2519                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2520                         </actions>
2521                 </permacrud>
2522         </class>
2523         <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">
2524                 <fields oils_persist:primary="name">
2525                         <field name="name" reporter:datatype="text"/>
2526                         <field name="label" reporter:datatype="text"/>
2527                         <field name="description" reporter:datatype="text"/>
2528                         <field name="datatype" reporter:datatype="text"/>
2529                         <field name="view_perm" reporter:datatype="link"/>
2530                         <field name="update_perm" reporter:datatype="link"/>
2531                         <field name="fm_class" reporter:datatype="text"/>
2532                         <field name="grp" reporter:datatype="link"/>
2533                 </fields>
2534                 <links>
2535                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2536                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2537                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2538                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2539                 </links>
2540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2541                         <actions>
2542                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2543                                 <retrieve/>
2544                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2545                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2546                         </actions>
2547                 </permacrud>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2551                         <field name="id" />
2552                         <field name="name"  reporter:datatype="text"/>
2553                         <field name="org_unit" reporter:datatype="org_unit"/>
2554                         <field name="value"  reporter:datatype="text"/>
2555                 </fields>
2556                 <links>
2557                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2558                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2559                 </links>
2560         </class>
2561         <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">
2562                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2563                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2564                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2565                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2566                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2567                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2568                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2569                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2570                 </fields>
2571                 <links>
2572                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2573                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2574                 </links>
2575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2576             <actions>
2577                 <create permission="CREATE_COPY_NOTE">
2578                     <context link="owning_copy" field="circ_lib"/>
2579                 </create>
2580                 <retrieve permission="VIEW_COPY_NOTES">
2581                     <context link="owning_copy" field="circ_lib"/>
2582                 </retrieve>
2583                 <update permission="UPDATE_COPY_NOTE">
2584                     <context link="owning_copy" field="circ_lib"/>
2585                 </update>
2586                 <delete permission="DELETE_COPY_NOTE">
2587                     <context link="owning_copy" field="circ_lib"/>
2588                 </delete>
2589             </actions>
2590         </permacrud>
2591         </class>
2592         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2593                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2594                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2595                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2596                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2597                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2598                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2599                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2600                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2601                 </fields>
2602                 <links>
2603                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2604                 </links>
2605         </class>
2606         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2607                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2608                         <field name="fingerprint"  reporter:datatype="text"/>
2609                         <field name="id" reporter:datatype="id" />
2610                         <field name="master_record" reporter:datatype="link"/>
2611                         <field name="mods"  reporter:datatype="text"/>
2612                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2613                 </fields>
2614                 <links>
2615                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2616                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2617                 </links>
2618         </class>
2619         <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">
2620                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2621                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2622                         <field name="name"  reporter:datatype="text"/>
2623                 </fields>
2624                 <links/>
2625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2626             <actions>
2627                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2628                 <retrieve/>
2629                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2630                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2631             </actions>
2632         </permacrud>
2633         </class>
2634         <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">
2635                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2636                         <field name="code"  reporter:datatype="text"/>
2637                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2638                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2639                 </fields>
2640                 <links/>
2641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2642             <actions>
2643                 <create permission="CREATE_PERM" global_required="true"/>
2644                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2645                 <update permission="UPDATE_PERM" global_required="true"/>
2646                 <delete permission="DELETE_PERM" global_required="true"/>
2647             </actions>
2648         </permacrud>
2649         </class>
2650         <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">
2651                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2652                         <field name="id" reporter:datatype="id" />
2653                         <field name="metarecord" reporter:datatype="link"/>
2654                         <field name="source" reporter:datatype="link"/>
2655                 </fields>
2656                 <links>
2657                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2658                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2659                 </links>
2660         </class>
2661         <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">
2662                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2663                         <field name="id" reporter:datatype="id" />
2664                         <field name="field" reporter:datatype="link"/>
2665                         <field name="source" reporter:datatype="link"/>
2666                         <field name="value"  reporter:datatype="text"/>
2667                 </fields>
2668                 <links>
2669                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2670                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2671                 </links>
2672         </class>
2673         <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">
2674                 <oils_persist:source_definition>
2675                         SELECT * FROM metabib.author_field_entry
2676                                                 UNION ALL
2677                         SELECT * FROM metabib.keyword_field_entry
2678                                                 UNION ALL
2679                         SELECT * FROM metabib.identifier_field_entry
2680                                                 UNION ALL
2681                         SELECT * FROM metabib.title_field_entry
2682                                                 UNION ALL
2683                         SELECT * FROM metabib.subject_field_entry
2684                                                 UNION ALL
2685                         SELECT * FROM metabib.series_field_entry
2686                 </oils_persist:source_definition>
2687                 <fields>
2688                         <field name="field" reporter:datatype="link"/>
2689                         <field name="id" reporter:datatype="id" />
2690                         <field name="source" reporter:datatype="link"/>
2691                         <field name="value"  reporter:datatype="text"/>
2692                 </fields>
2693                 <links>
2694                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2695                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2696                 </links>
2697         </class>
2698         <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">
2699                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2700                         <field name="field" reporter:datatype="link"/>
2701                         <field name="id" reporter:datatype="id" />
2702                         <field name="source" reporter:datatype="link"/>
2703                         <field name="value"  reporter:datatype="text"/>
2704                 </fields>
2705                 <links>
2706                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2707                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2708                 </links>
2709         </class>
2710         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2711                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2712                         <field name="accepting_usr" reporter:datatype="link"/>
2713                         <field name="amount" reporter:datatype="money" />
2714                         <field name="amount_collected" reporter:datatype="money" />
2715                         <field name="cash_drawer" reporter:datatype="link"/>
2716                         <field name="id" reporter:datatype="id" />
2717                         <field name="note"  reporter:datatype="text"/>
2718                         <field name="payment_ts" reporter:datatype="timestamp"/>
2719                         <field name="xact" reporter:datatype="link"/>
2720                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2721                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2722                 </fields>
2723                 <links>
2724                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2725                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2726                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2727                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2728                 </links>
2729         </class>
2730         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2731                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2732                         <field name="accepting_usr" reporter:datatype="link"/>
2733                         <field name="amount" reporter:datatype="money" />
2734                         <field name="amount_collected" reporter:datatype="money" />
2735                         <field name="id" reporter:datatype="id" />
2736                         <field name="note"  reporter:datatype="text"/>
2737                         <field name="payment_ts" reporter:datatype="timestamp"/>
2738                         <field name="xact" reporter:datatype="link"/>
2739                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2740                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2741                 </fields>
2742                 <links>
2743                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2744                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2745                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2746                 </links>
2747         </class>
2748         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2749                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2750                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2751                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2752                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2753                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2754                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2755                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2756                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2757                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2758                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2759                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2760                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2761                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2762                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2763                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2764                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2765                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2766                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2767                 </fields>
2768                 <links>
2769                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2770                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2771                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2772                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2773                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2774                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2775                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2776                 </links>
2777         </class>
2778
2779         <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">
2780                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2781                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2782                         <field name="name"  reporter:datatype="text"/>
2783                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2784                         <field name="block_list" reporter:datatype="text"/>
2785                         <field name="org_depth" reporter:datatype="int"/>
2786                 </fields>
2787                 <links/>
2788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2789             <actions>
2790                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2791                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2792                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2793                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2794             </actions>
2795         </permacrud>
2796         </class>
2797         <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">
2798                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2799                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2800                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2801                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2802                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2803                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2804                 </fields>
2805                 <links>
2806                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2807                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2808                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2809         </links>
2810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2811             <actions>
2812                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2813                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2814                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2815                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2816             </actions>
2817         </permacrud>
2818         </class>
2819         <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">
2820                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2821                         <field name="holdable" reporter:datatype="bool"/>
2822                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2823                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2824                         <field name="opac_visible" reporter:datatype="bool"/>
2825             <field name="copy_active" reporter:datatype="bool"/>
2826                 </fields>
2827                 <links/>
2828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2829             <actions>
2830                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2831                 <retrieve/>
2832                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2833                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2834             </actions>
2835         </permacrud>
2836         </class>
2837         <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">
2838                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2839                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2840                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2841                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2842                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2843                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2844                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2845                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2846                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2847                 </fields>
2848                 <links>
2849                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2850                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2851                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2852                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2853                 </links>
2854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2855                         <actions>
2856                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2857                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2858                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2859                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2860                         </actions>
2861                 </permacrud>
2862         </class>
2863         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2864                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2865                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2866                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2867                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2868                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2869                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2870                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2871                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2872                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2873                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2874                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2875                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2876                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2877                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2878                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2879                 </fields>
2880                 <links>
2881                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2882                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2883                 </links>
2884         </class>
2885
2886         <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">
2887                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2888                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2889                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2890                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2891                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2892                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2893                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2894                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2895                 </fields>
2896                 <links>
2897                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2898                 </links>
2899         </class>
2900
2901         <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">
2902                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2903                         <field name="call_number" />
2904                         <field name="create_date" reporter:datatype="timestamp"/>
2905                         <field name="creator" reporter:datatype="link"/>
2906                         <field name="id" reporter:datatype="id" />
2907                         <field name="pub" reporter:datatype="bool"/>
2908                         <field name="title"  reporter:datatype="text"/>
2909                         <field name="value"  reporter:datatype="text"/>
2910                 </fields>
2911                 <links>
2912                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2913                 </links>
2914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2915             <actions>
2916                 <create permission="CREATE_VOLUME_NOTE">
2917                     <context link="call_number" field="owning_lib"/>
2918                 </create>
2919                 <retrieve permission="VIEW_VOLUME_NOTES">
2920                     <context link="call_number" field="owning_lib"/>
2921                 </retrieve>
2922                 <update permission="UPDATE_VOLUME_NOTE">
2923                     <context link="call_number" field="owning_lib"/>
2924                 </update>
2925                 <delete permission="DELETE_VOLUME_NOTE">
2926                     <context link="call_number" field="owning_lib"/>
2927                 </delete>
2928             </actions>
2929         </permacrud>
2930         </class>
2931         <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">
2932                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2933                         <field name="create_date" reporter:datatype="timestamp"/>
2934                         <field name="creator" reporter:datatype="link"/>
2935                         <field name="edit_date" reporter:datatype="timestamp"/>
2936                         <field name="editor" reporter:datatype="link"/>
2937                         <field name="id" reporter:datatype="id" />
2938                         <field name="record" reporter:datatype="link"/>
2939                         <field name="value" reporter:datatype="text"/>
2940                 </fields>
2941                 <links>
2942                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2943                 </links>
2944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2945             <actions>
2946                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2947                 <retrieve/>
2948                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2949                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2950             </actions>
2951         </permacrud>
2952         </class>
2953         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2954         <oils_persist:source_definition>
2955 SELECT  usr,
2956         SUM(
2957             CASE
2958                 WHEN (
2959                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2960                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2961                 ) THEN 1
2962                 ELSE 0
2963             END
2964         ) AS out,
2965
2966         SUM(
2967             CASE
2968                 WHEN (
2969                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2970                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2971                 ) THEN 1
2972                 ELSE 0
2973             END
2974         ) AS overdue,
2975
2976         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2977         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2978         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2979   FROM  action.circulation
2980   WHERE checkin_time IS NULL
2981   GROUP BY 1
2982         </oils_persist:source_definition>
2983         <fields oils_persist:primary="usr">
2984             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2985             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2986             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2987             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2988             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2989             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2990         </fields>
2991         <links>
2992             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2993         </links>
2994         </class>
2995         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2996         <oils_persist:source_definition>
2997 SELECT  usr,
2998         ARRAY_TO_STRING(ARRAY_ACCUM(
2999             CASE
3000                 WHEN (
3001                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3002                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3003                 ) THEN id
3004                 ELSE 0
3005             END
3006         ),',') AS out,
3007
3008         ARRAY_TO_STRING(ARRAY_ACCUM(
3009             CASE
3010                 WHEN (
3011                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3012                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3013                 ) THEN id
3014                 ELSE 0
3015             END
3016         ),',') AS overdue,
3017
3018         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3019         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3020         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3021   FROM  action.circulation
3022   WHERE checkin_time IS NULL
3023   GROUP BY 1
3024         </oils_persist:source_definition>
3025         <fields oils_persist:primary="usr">
3026             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3027             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3028             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3029             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3030             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3031             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3032         </fields>
3033         <links>
3034             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3035         </links>
3036         </class>
3037         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3039                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3040                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3041                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3042                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3043                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3044                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3045                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3046                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3047                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3048                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3049                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3050                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3051                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3052                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3053                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3054                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3055                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3056                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3057                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3058                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3059                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3060                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3061                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3062                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3063                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3064                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3065                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3066                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3067                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3068                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3069                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3070                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3071                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3072                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3073                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3074                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3075                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3076                 </fields>
3077                 <links>
3078                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3079                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3080                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3081                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3082                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3083                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3084                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3085                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3086                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3087                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3088                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3089                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3090                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3091                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3092                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3093                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3094                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3095                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3096                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3097                 </links>
3098         </class>
3099         <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">
3100                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3101                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3102                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3103                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3104                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3105                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3106                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3107                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3108                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3109                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3110                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3111                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3112                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3113                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3114                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3115                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3116                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3117                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3118                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3119                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3120                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3121                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3122                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3123                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3124                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3125                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3126                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3127                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3128                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3129                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3130                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3131                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3132                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3133                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3134                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3135                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3136                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3137                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3138                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3139                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3140                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3141                 </fields>
3142                 <links>
3143                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3144                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3145                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3146                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3147                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3148                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3149                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3150                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3151                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3152                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3153                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3154                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3155                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3156                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3157                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3158                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3159                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3160                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3161                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3162                 </links>
3163         </class>
3164         <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">
3165                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3166                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3167                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3168                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3169                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3170                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3171                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3172                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3173                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3174                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3175                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3176                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3177                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3178                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3179                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3180                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3181                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3182                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3183                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3184                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3185                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3186                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3187                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3188                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3189                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3190                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3191                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3192                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3193                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3194                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3195                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3196                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3200                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3201                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3202                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3203                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3204                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3205                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3206                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3207                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3208                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3209                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3210                 </fields>
3211                 <links>
3212                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3213                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3214                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3215                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3216                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3217                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3218                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3219                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3220                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3221                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3222                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3223                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3224                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3225                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3226                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3227                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3228                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3229                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3230                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3231                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3232                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3233                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3234                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3235                 </links>
3236         </class>
3237
3238         <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">
3239                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3240                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3241                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3242                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3243                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3244                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3245                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3246                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3247                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3248                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3249                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3250                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3251                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3252                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3253                 </fields>
3254                 <links>
3255                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3256                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3257                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3258                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3259                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3260                 </links>
3261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3262                         <actions>
3263                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3264                                 <retrieve />
3265                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3266                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3267                         </actions>
3268                 </permacrud>
3269         </class>
3270
3271         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3272                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3273                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3274                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3275                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3276                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3277                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3278                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3279                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3280                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3281                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3282                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3283                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3284                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3285                 </fields>
3286                 <links>
3287                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3288                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3289                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3290                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3291                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3292                 </links>
3293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3294                         <actions>
3295                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3296                                 <retrieve />
3297                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3298                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3299                         </actions>
3300                 </permacrud>
3301         </class>
3302         
3303         <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">
3304                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3305                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3306                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3307                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3308                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3309                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3310                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3311                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3312                 </fields>
3313                 <links>
3314                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3315                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3316                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3317                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3318                 </links>
3319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3320                         <actions>
3321                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3322                                 <retrieve />
3323                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3324                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3325                         </actions>
3326                 </permacrud>
3327         </class>
3328         
3329         <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">
3330                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3331                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3332                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3333                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3334                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3335                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3336                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3337                 </fields>
3338                 <links>
3339                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3340                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3341                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3342                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3343                 </links>
3344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3345                         <actions>
3346                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3347                                 <retrieve />
3348                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3349                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3350                         </actions>
3351                 </permacrud>
3352         </class>
3353         
3354         <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">
3355                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3356                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3357                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3358                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3359                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3360                 </fields>
3361                 <links>
3362                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3363                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3364                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3365                 </links>
3366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3367                         <actions>
3368                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3369                                 <retrieve />
3370                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3371                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3372                         </actions>
3373                 </permacrud>
3374         </class>
3375         
3376         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3377                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3378                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3379                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3380                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3381                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3382                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3383                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3384                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3385                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3386                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3387                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3388                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3389                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3390                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3391                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3392                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3393                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3394                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3395                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3396                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3397                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3398                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3399                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3400                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3401                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3402                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3403                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3404                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3405                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3406                 </fields>
3407                 <links>
3408                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3409                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3410                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3411                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3412                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3413                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3414                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3415                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3416                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3417                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3418                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3419                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3420                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3421                 </links>
3422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3423                         <actions>
3424                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3425                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3426                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3427                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3428                         </actions>
3429                 </permacrud>
3430         </class>
3431         
3432         <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">
3433                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3434                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3435                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3436                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3437                 </fields>
3438                 <links>
3439                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3440                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3441                 </links>
3442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3443                         <actions>
3444                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3445                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3446                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3447                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3448                         </actions>
3449                 </permacrud>
3450         </class>
3451
3452         <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">
3453                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3454                         <field name="bucket" reporter:datatype="link"/>
3455                         <field name="id" reporter:datatype="id" />
3456                         <field name="target_call_number" reporter:datatype="link" />
3457                         <field name="create_time" reporter:datatype="timestamp" />
3458                         <field name="pos" reporter:datatype="int" />
3459                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3460                 </fields>
3461                 <links>
3462                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3463                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3464             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3465                 </links>
3466         </class>
3467         <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">
3468                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3469                         <field name="id" reporter:datatype="id" />
3470                         <field name="item" reporter:datatype="link"/>
3471                         <field name="note" reporter:datatype="text" />
3472                 </fields>
3473                 <links>
3474                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3475                 </links>
3476         </class>
3477         <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">
3478                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3479                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3480                         <field name="btype" reporter:datatype="text"/>
3481                         <field name="id" reporter:datatype="id" />
3482                         <field name="name" reporter:datatype="text"/>
3483                         <field name="owner" reporter:datatype="link"/>
3484                         <field name="pub" reporter:datatype="bool"/>
3485                         <field name="create_time" reporter:datatype="timestamp" />
3486                 </fields>
3487                 <links>
3488                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3489                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3490                 </links>
3491         </class>
3492         <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">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3494                         <field name="id" reporter:datatype="id" />
3495                         <field name="bucket" reporter:datatype="link"/>
3496                         <field name="note" reporter:datatype="text" />
3497                 </fields>
3498                 <links>
3499                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3500                 </links>
3501         </class>
3502         <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">
3503                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3504                         <field name="hold" reporter:datatype="link"/>
3505                         <field name="id" reporter:datatype="id" />
3506                         <field name="target_copy" reporter:datatype="link"/>
3507                 </fields>
3508                 <links>
3509                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3510                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3511                 </links>
3512         </class>
3513         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3514                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3515                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3516                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3517                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3518                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3519                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3520                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3521                 </fields>
3522                 <links>
3523                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3524                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3525                 </links>
3526         </class>
3527         <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">
3528                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3529                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3530                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3531                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3532                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3533                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3534                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3535                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3536                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3537                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3538                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3539                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3540                 </fields>
3541                 <links>
3542                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3543                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3544                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3545                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3546                 </links>
3547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3548             <actions>
3549                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3550                 <retrieve/>
3551                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3552                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3553             </actions>
3554         </permacrud>
3555         </class>
3556
3557     <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">
3558         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3559             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3560             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3561             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3562             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3563         </fields>
3564         <links>
3565             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3566             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3567         </links>
3568         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3569             <actions>
3570                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3571                 <retrieve/>
3572                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3573                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3574             </actions>
3575         </permacrud>
3576     </class>
3577
3578         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3579                 <fields>
3580                         <field name="sre_id" oils_persist:virtual="true" />
3581                         <field name="location" oils_persist:virtual="true" />
3582                         <field name="owning_lib" oils_persist:virtual="true" />
3583                         <field name="basic_holdings" oils_persist:virtual="true" />
3584                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3585                         <field name="supplement_holdings" oils_persist:virtual="true" />
3586                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3587                         <field name="index_holdings" oils_persist:virtual="true" />
3588                         <field name="index_holdings_add" oils_persist:virtual="true" />
3589                         <field name="online" oils_persist:virtual="true" />
3590                         <field name="missing" oils_persist:virtual="true" />
3591                         <field name="incomplete" oils_persist:virtual="true" />
3592                 </fields>
3593         </class>
3594
3595         <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">
3596                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3597                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3598                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3599                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3600                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3601                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3602                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3603                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3604                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3605                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3606                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3607                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3608                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3609                 </fields>
3610                 <links>
3611                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3612                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3613                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3614                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3615                 </links>
3616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3617                         <actions>
3618                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3619                                 <retrieve/>
3620                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3621                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3622                         </actions>
3623                 </permacrud>
3624         </class>
3625
3626         <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">
3627                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3628                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3629                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3630                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3631                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3632                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3633                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3634                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3635                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3636                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3637                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3638                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3639                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3640                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3641                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3642                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3643                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3644                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3645                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3646                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3647                 </fields>
3648                 <links>
3649                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3650                 </links>
3651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3652                         <actions>
3653                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3654                                         <context link="subscription" field="owning_lib" />
3655                                 </create>
3656                                 <retrieve />
3657                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3658                                         <context link="subscription" field="owning_lib" />
3659                                 </update>
3660                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3661                                         <context link="subscription" field="owning_lib" />
3662                                 </delete>
3663                         </actions>
3664                 </permacrud>
3665         </class>
3666
3667         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3669                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3670                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3671                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3672                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3673                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3674                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3675                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3676                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3677                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3678                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3679                 </fields>
3680                 <links>
3681                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3682                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3683                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3684                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3685                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3686                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3687                 </links>
3688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3689                         <actions>
3690                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3691                                 <retrieve />
3692                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3693                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3694                         </actions>
3695                 </permacrud>
3696         </class>
3697
3698         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3700                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3701                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3702                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3703                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3704                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3705                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3706                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3707                 </fields>
3708                 <links>
3709                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3710                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3711                 </links>
3712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3713                 </permacrud>
3714         </class>
3715
3716         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3717                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3718                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3719                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3720                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3721                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3722                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3723                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3724                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3725                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3726                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3727                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3728                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3729                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3730                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3732                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3734                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3735                 </fields>
3736                 <links>
3737                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3738                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3739                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3740                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3741                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3742                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3743                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3744                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3745                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3746                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3747                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3748                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3749                 </links>
3750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3751                         <actions>
3752                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3753                                 <retrieve />
3754                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3755                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3756                         </actions>
3757                 </permacrud>
3758         </class>
3759
3760         <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">
3761                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3763                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3764                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3765                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3766                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3767                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3768                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3769                 </fields>
3770                 <links>
3771                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3772                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3773                 </links>
3774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3775                         <actions>
3776                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3777                                         <context link="distribution" field="holding_lib" />
3778                                 </create>
3779                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3780                                         <context link="distribution" field="holding_lib" />
3781                                 </retrieve>
3782                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3783                                         <context link="distribution" field="holding_lib" />
3784                                 </update>
3785                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3786                                         <context link="distribution" field="holding_lib" />
3787                                 </delete>
3788                         </actions>
3789                 </permacrud>
3790         </class>
3791
3792         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3793                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3794                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3795                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3796                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3797                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3798                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3799                 </fields>
3800                 <links>
3801                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3802                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3803                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3804                 </links>
3805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3806                         <actions>
3807                                 <create permission="ADMIN_SERIAL_STREAM">
3808                                         <context link="distribution" field="holding_lib" />
3809                                 </create>
3810                                 <retrieve />
3811                                 <update permission="ADMIN_SERIAL_STREAM">
3812                                         <context link="distribution" field="holding_lib" />
3813                                 </update>
3814                                 <delete permission="ADMIN_SERIAL_STREAM">
3815                                         <context link="distribution" field="holding_lib" />
3816                                 </delete>
3817                         </actions>
3818                 </permacrud>
3819         </class>
3820
3821         <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">
3822                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3823                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3824                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3825                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3826                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3827                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3828                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3829                 </fields>
3830                 <links>
3831                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3832                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3833                 </links>
3834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3835                         <actions>
3836                                 <create permission="ADMIN_SERIAL_STREAM">
3837                                         <context link="stream" jump="distribution" field="holding_lib" />
3838                                 </create>
3839                                 <retrieve permission="RECEIVE_SERIAL">
3840                                         <context link="stream" jump="distribution" field="holding_lib" />
3841                                 </retrieve>
3842                                 <update permission="ADMIN_SERIAL_STREAM">
3843                                         <context link="stream" jump="distribution" field="holding_lib" />
3844                                 </update>
3845                                 <delete permission="ADMIN_SERIAL_STREAM">
3846                                         <context link="stream" jump="distribution" field="holding_lib" />
3847                                 </delete>
3848                         </actions>
3849                 </permacrud>
3850         </class>
3851
3852         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3853                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3854                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3855                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3856                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3857                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3858                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3859                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3860                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3861                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3862                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3863                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3864                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3865                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3866                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3867                 </fields>
3868                 <links>
3869                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3870                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3871                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3872                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3873                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3874                 </links>
3875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3876                         <actions>
3877                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3878                                         <context link="subscription" field="owning_lib" />
3879                                 </create>
3880                                 <retrieve/>
3881                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3882                                         <context link="subscription" field="owning_lib" />
3883                                 </update>
3884                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3885                                         <context link="subscription" field="owning_lib" />
3886                                 </delete>
3887                         </actions>
3888                 </permacrud>
3889         </class>
3890
3891         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3893                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3894                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3895                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3896                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3897                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3898                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3899                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3900                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3901                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3902                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3903                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3904                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
3905                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3906                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3907                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3908                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3909                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3910                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3911                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3912                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3913                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3914                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3915                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3916                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3917                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3918                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3919                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3920                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3921                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3922                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3923                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3924                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3925                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3926                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3927                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3928                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3929                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3938                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3939                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3940                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3941                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3942                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3943                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3944                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3945                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3946                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3947                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3948                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3949                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3950                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3951                 </links>
3952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3953                         <actions>
3954                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3955                                 <retrieve/>
3956                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3957                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3958                         </actions>
3959                 </permacrud>
3960         </class>
3961
3962         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3963                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3964                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3965                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3966                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3967                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3968                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3969                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3970                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3971                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3972                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3973                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3974                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3975                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3976                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3977                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3978                 </fields>
3979                 <links>
3980                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3981                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3982                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3983                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3984                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3985                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3986                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3987                 </links>
3988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3989                         <actions>
3990                                 <create permission="ADMIN_SERIAL_ITEM">
3991                                         <context link="stream" jump="distribution" field="holding_lib" />
3992                                 </create>
3993                                 <retrieve permission="ADMIN_SERIAL_ITEM">
3994                                         <context link="stream" jump="distribution" field="holding_lib" />
3995                                 </retrieve>
3996                                 <update permission="ADMIN_SERIAL_ITEM">
3997                                         <context link="stream" jump="distribution" field="holding_lib" />
3998                                 </update>
3999                                 <delete permission="ADMIN_SERIAL_ITEM">
4000                                         <context link="stream" jump="distribution" field="holding_lib" />
4001                                 </delete>
4002                         </actions>
4003                 </permacrud>
4004         </class>
4005
4006         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4007                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4008                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4009                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4010                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4011                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4012                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4013                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4014                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4015                 </fields>
4016                 <links>
4017                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4018                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4019                 </links>
4020                 <!-- Not available via PCRUD at this time -->
4021         </class>
4022
4023         <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">
4024                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4025                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4026                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4027                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4028                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4029                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4030                 </fields>
4031                 <links>
4032                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4033                 </links>
4034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4035                         <actions>
4036                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4037                                         <context link="distribution" field="holding_lib" />
4038                                 </create>
4039                                 <retrieve/>
4040                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4041                                         <context link="distribution" field="holding_lib" />
4042                                 </update>
4043                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4044                                         <context link="distribution" field="holding_lib" />
4045                                 </create>
4046                         </actions>
4047                 </permacrud>
4048         </class>
4049
4050         <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">
4051                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4052                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4053                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4054                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4055                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4056                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4057                 </fields>
4058                 <links>
4059                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4060                 </links>
4061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4062                         <actions>
4063                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4064                                         <context link="distribution" field="holding_lib" />
4065                                 </create>
4066                                 <retrieve/>
4067                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4068                                         <context link="distribution" field="holding_lib" />
4069                                 </update>
4070                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4071                                         <context link="distribution" field="holding_lib" />
4072                                 </create>
4073                         </actions>
4074                 </permacrud>
4075         </class>
4076
4077         <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">
4078                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4079                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4080                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4081                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4082                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4083                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4084                 </fields>
4085                 <links>
4086                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4087                 </links>
4088                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4089                         <actions>
4090                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4091                                         <context link="distribution" field="holding_lib" />
4092                                 </create>
4093                                 <retrieve/>
4094                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4095                                         <context link="distribution" field="holding_lib" />
4096                                 </update>
4097                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4098                                         <context link="distribution" field="holding_lib" />
4099                                 </create>
4100                         </actions>
4101                 </permacrud>
4102         </class>
4103
4104         <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">
4105                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4106                         <field name="id" reporter:datatype="id" />
4107                         <field name="owning_copy" reporter:datatype="link"/>
4108                         <field name="stat_cat" reporter:datatype="link"/>
4109                         <field name="stat_cat_entry" reporter:datatype="link"/>
4110                 </fields>
4111                 <links>
4112                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4113                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4114                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4115                 </links>
4116         </class>
4117         <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">
4118                 <fields oils_persist:primary="code">
4119                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4120                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4121                 </fields>
4122                 <links/>
4123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4124             <actions>
4125                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4126                 <retrieve/>
4127                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4128                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4129             </actions>
4130         </permacrud>
4131         </class>
4132         <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">
4133                 <fields oils_persist:primary="code">
4134                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4135                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4136                 </fields>
4137                 <links/>
4138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4139             <actions>
4140                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4141                 <retrieve/>
4142                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4143                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4144             </actions>
4145         </permacrud>
4146         </class>
4147         <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">
4148                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4149                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4150                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4151                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4152                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4153                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4154                 </fields>
4155                 <links>
4156             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4157         </links>
4158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4159             <actions>
4160                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4161                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4162                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4163                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4164             </actions>
4165         </permacrud>
4166         </class>
4167         <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">
4168                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4169                         <field name="id" reporter:datatype="id" />
4170                         <field name="name" reporter:datatype="text"/>
4171                 </fields>
4172                 <links/>
4173         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4174             <actions>
4175                 <create permission="CREATE_LASSO" global_required="true"/>
4176                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4177                 <update permission="UPDATE_LASSO" global_required="true"/>
4178                 <delete permission="DELETE_LASSO" global_required="true"/>
4179             </actions>
4180         </permacrud>
4181         </class>
4182         <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">
4183                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4184                         <field name="id" reporter:datatype="id" />
4185                         <field name="lasso" reporter:datatype="link"/>
4186                         <field name="org_unit" reporter:datatype="org_unit"/>
4187                 </fields>
4188                 <links>
4189                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4190                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4191                 </links>
4192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4193             <actions>
4194                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4195                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4196                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4197                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4198             </actions>
4199         </permacrud>
4200         </class>
4201         <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">
4202                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4203                         <field name="id" reporter:datatype="id" />
4204                         <field name="from_org" reporter:datatype="org_unit"/>
4205                         <field name="to_org" reporter:datatype="org_unit"/>
4206                         <field name="prox" reporter:datatype="int" />
4207                 </fields>
4208                 <links>
4209                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4210                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4211                 </links>
4212         </class>
4213         <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">
4214                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4215                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4216                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4217                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4218                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4219                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4220                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4221                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4222                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4223                 </fields>
4224                 <links/>
4225         </class>
4226         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4227                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4228                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4229                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4230                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4231                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4232                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4233                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4234                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4235                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4236                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4237                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4238                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4239                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4240                 </fields>
4241                 <links>
4242                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4243                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4244                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4245                 </links>
4246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4247             <actions>
4248                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4249                 <retrieve/>
4250                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4251                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4252             </actions>
4253         </permacrud>
4254         </class>
4255         <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">
4256                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4257                         <field name="address_type"  reporter:datatype="text"/>
4258                         <field name="city"  reporter:datatype="text"/>
4259                         <field name="country"  reporter:datatype="text"/>
4260                         <field name="county"  reporter:datatype="text"/>
4261                         <field name="id" reporter:datatype="id" />
4262                         <field name="org_unit" reporter:datatype="org_unit"/>
4263                         <field name="post_code"  reporter:datatype="text"/>
4264                         <field name="state"  reporter:datatype="text"/>
4265                         <field name="street1"  reporter:datatype="text"/>
4266                         <field name="street2"  reporter:datatype="text"/>
4267                         <field name="valid" reporter:datatype="bool"/>
4268                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4269                 </fields>
4270                 <links>
4271                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4272                 </links>
4273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4274             <actions>
4275                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4276                 <retrieve/>
4277                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4278                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4279             </actions>
4280         </permacrud>
4281         </class>
4282         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
4283                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4284                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4285                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4286                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4287                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4288                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4289                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4290                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4291                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4292                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4293                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4294                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4295                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4296                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4297                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4298                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4299                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4300                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4301                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4302                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4303                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4304                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4305                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4306                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4307                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4308                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4309                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4310                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4311                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4312                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4313                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4314                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4315                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4316                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4317                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4318                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4319                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4320                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4321                 </fields>
4322                 <links>
4323                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4324                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4325                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4326                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4327                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4328                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4329                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4330                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4331                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4332                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4333                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4334                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4335                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4336                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4337                 </links>
4338         </class>
4339         <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">
4340                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4341                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4342                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4343                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4344                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4345                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4346                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4347                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4348                 </fields>
4349                 <links>
4350                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4351                 </links>
4352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4353                         <actions>
4354                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4355                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4356                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4357                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4358                         </actions>
4359                 </permacrud>
4360         </class>
4361         <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">
4362                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4363                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4364                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4365                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4366                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4367                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4368                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4369                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4370                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4371                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4372                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4373                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4374                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4375                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4376                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4377                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4378                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4379                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4380                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4381                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4382                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4383                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4384                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4385                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4386                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4387                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4388                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4389                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4390                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4391                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4392                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4393                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4394                 </fields>
4395                 <links>
4396                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4397                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4398                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4399                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4400                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4401                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4402                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4403                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4404                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4405                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4406                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4407                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4408                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4409                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4410                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4411                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4412                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4413                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4414                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4415                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4416                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4417                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4418                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4419                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4420                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4421                 </links>
4422         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4423             <actions>
4424                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4425                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4426                     <context field="id"/>
4427                     <context field="parent_ou"/>
4428                                 </retrieve>
4429                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4430                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4431             </actions>
4432         </permacrud>
4433         </class>
4434         <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">
4435                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4436                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4437                         <field name="btype" reporter:datatype="text"/>
4438                         <field name="id" reporter:datatype="id" />
4439                         <field name="name"  reporter:datatype="text"/>
4440                         <field name="owner" reporter:datatype="link"/>
4441                         <field name="pub" reporter:datatype="bool"/>
4442                         <field name="create_time" reporter:datatype="timestamp" />
4443                 </fields>
4444                 <links>
4445                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4446                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4447                 </links>
4448         </class>
4449         <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">
4450                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4451                         <field name="id" reporter:datatype="id" />
4452                         <field name="bucket" reporter:datatype="link"/>
4453                         <field name="note" reporter:datatype="text" />
4454                 </fields>
4455                 <links>
4456                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4457                 </links>
4458         </class>
4459         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4460                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4461                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4462                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4464                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4465                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4466                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4467                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4468                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4469                 </fields>
4470                 <links>
4471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4472                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4473                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4474                 </links>
4475         </class>
4476         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4477                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4478                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4479                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4480                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4481                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4482                 </fields>
4483                 <links>
4484                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4485                 </links>
4486         </class>
4487     <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">
4488         <fields oils_persist:primary="field">
4489             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4490             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4491             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4492         </fields>
4493         <links/>
4494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4495             <actions>
4496                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4497                 <retrieve />
4498                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4499                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4500             </actions>
4501         </permacrud>
4502     </class>
4503         <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">
4504                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4505                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4506                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4507                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4508                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4509                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4510                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4511                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4512                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4513                 </fields>
4514                 <links>
4515                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4516                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4517                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4518                 </links>
4519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4520             <actions>
4521                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4522                 <retrieve />
4523                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4524                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4525             </actions>
4526         </permacrud>
4527         </class>
4528         <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">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4530                         <field name="field" reporter:datatype="link"/>
4531                         <field name="id" reporter:datatype="id" />
4532                         <field name="source" reporter:datatype="link"/>
4533                         <field name="value"  reporter:datatype="text"/>
4534                 </fields>
4535                 <links>
4536                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4537                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4538                 </links>
4539         </class>
4540         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4541                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4542                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4543                         <field name="btype" reporter:datatype="text"/>
4544                         <field name="id" reporter:datatype="id" />
4545                         <field name="name"  reporter:datatype="text"/>
4546                         <field name="owner" reporter:datatype="link"/>
4547                         <field name="pub" reporter:datatype="bool"/>
4548                         <field name="create_time" reporter:datatype="timestamp" />
4549                 </fields>
4550                 <links>
4551                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4552                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4553                 </links>
4554         </class>
4555         <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">
4556                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4557                         <field name="id" reporter:datatype="id" />
4558                         <field name="bucket" reporter:datatype="link"/>
4559                         <field name="note" reporter:datatype="text" />
4560                 </fields>
4561                 <links>
4562                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4563                 </links>
4564         </class>
4565         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4566                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4567                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4568                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4569                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4570                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4571                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4572                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4573                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4574                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4575                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4576                 </fields>
4577                 <links>
4578                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4579                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4580                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4581                 </links>
4582         </class>
4583         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4584                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4585                         <field name="id" reporter:datatype="id" />
4586                         <field name="ind1" />
4587                         <field name="ind2" />
4588                         <field name="record" />
4589                         <field name="subfield" />
4590                         <field name="tag" />
4591                         <field name="value" />
4592                 </fields>
4593                 <links>
4594                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4595                 </links>
4596         </class>
4597         <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">
4598                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4599                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4600                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4601                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4602                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4603                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4604                 </fields>
4605                 <links>
4606                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4607                 </links>
4608         </class>
4609         <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">
4610                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4611                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4612                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4613                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4614                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4615                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4616                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4617                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4618                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4619                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4620                 </fields>
4621                 <links>
4622                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4623                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4624                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4625                 </links>
4626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4627             <actions>
4628                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4629                 <retrieve/>
4630                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4631                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4632             </actions>
4633         </permacrud>
4634         </class>
4635         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4636                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4637                         <field name="create_date" reporter:datatype="timestamp"/>
4638                         <field name="creator" reporter:datatype="link"/>
4639                         <field name="edit_date" reporter:datatype="timestamp"/>
4640                         <field name="editor" reporter:datatype="link"/>
4641                         <field name="id" reporter:datatype="id" />
4642                         <field name="pub" reporter:datatype="bool"/>
4643                         <field name="record" reporter:datatype="link"/>
4644                         <field name="value"  reporter:datatype="text"/>
4645                 </fields>
4646                 <links>
4647                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4648                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4649                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4650                 </links>
4651         </class>
4652         <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">
4653                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4654                         <field name="balance_owed" reporter:datatype="money" />
4655                         <field name="total_owed" reporter:datatype="money" />
4656                         <field name="total_paid" reporter:datatype="money" />
4657                         <field name="usr" reporter:datatype="link"/>
4658                 </fields>
4659                 <links>
4660                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4661                 </links>
4662         </class>
4663         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4664                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4665                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4666                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4667                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4668                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4669                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4670                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4671                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4674                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4675                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4676                 </fields>
4677                 <links>
4678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4679                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4680                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4681                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4682                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4683                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4684                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4685                 </links>
4686         </class>
4687         <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">
4688                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4689                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4690                         <field name="quality" reporter:datatype="int" />
4691                         <field name="source" reporter:datatype="text"/>
4692                         <field name="transcendant" reporter:datatype="bool"/>
4693                 </fields>
4694                 <links/>
4695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4696             <actions>
4697                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4698                 <retrieve/>
4699                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4700                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4701             </actions>
4702         </permacrud>
4703         </class>
4704         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4705                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4706                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4707                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4708                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4709                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4710                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4711                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4712                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4713                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4714                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4715                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4716                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4717                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4718                 </fields>
4719                 <links>
4720                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4721                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4722                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4723                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4724                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4725                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4726                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4727                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4728                 </links>
4729         </class>
4730         <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">
4731                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4732                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4733                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4734                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4735                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4736                 </fields>
4737                 <links>
4738                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4739                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4740                 </links>
4741         </class>
4742         <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">
4743                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4744                         <field name="bucket" reporter:datatype="link"/>
4745                         <field name="id" reporter:datatype="id" />
4746                         <field name="target_user" reporter:datatype="link"/>
4747                         <field name="create_time" reporter:datatype="timestamp" />
4748                         <field name="pos" reporter:datatype="int" />
4749                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4750                 </fields>
4751                 <links>
4752                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4753                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4754             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4755                 </links>
4756         </class>
4757         <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">
4758                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4759                         <field name="id" reporter:datatype="id" />
4760                         <field name="item" reporter:datatype="link"/>
4761                         <field name="note" reporter:datatype="text" />
4762                 </fields>
4763                 <links>
4764                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4765                 </links>
4766         </class>
4767         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4768                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4769                         <field name="balance_owed" reporter:datatype="money" />
4770                         <field name="total_owed" reporter:datatype="money" />
4771                         <field name="total_paid" reporter:datatype="money" />
4772                         <field name="usr" reporter:datatype="link"/>
4773                 </fields>
4774                 <links>
4775                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4776                 </links>
4777         </class>
4778         <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">
4779                 <fields oils_persist:primary="code" oils_persist:sequence="">
4780                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4781                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4782                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4783                 </fields>
4784                 <links/>
4785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4786             <actions>
4787                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4788                 <retrieve/>
4789                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4790                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4791             </actions>
4792         </permacrud>
4793         </class>
4794         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4795                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4796                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4797                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4798                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4799                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4800                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4801                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4802                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4803                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4804                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4805                 </fields>
4806                 <links>
4807                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4808                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4809                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4810                 </links>
4811         </class>
4812         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4813                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4814                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4815                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4816                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4817                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4818                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4819                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4820                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4821                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4822                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4823                 </fields>
4824                 <links>
4825                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4826                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4827                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4828                 </links>
4829         </class>
4830         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4831                 <fields oils_persist:primary="id" oils_persist:sequence="">
4832                         <field name="checkin_lib" reporter:datatype="link"/>
4833                         <field name="checkin_staff" reporter:datatype="link"/>
4834                         <field name="checkin_time" reporter:datatype="timestamp"/>
4835                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4836                         <field name="circ_staff" reporter:datatype="link"/>
4837                         <field name="desk_renewal" reporter:datatype="bool"/>
4838                         <field name="due_date" reporter:datatype="timestamp"/>
4839                         <field name="duration" reporter:datatype="interval"/>
4840                         <field name="duration_rule" reporter:datatype="link"/>
4841                         <field name="fine_interval" reporter:datatype="interval"/>
4842                         <field name="id" reporter:datatype="id" />
4843                         <field name="max_fine" reporter:datatype="money" />
4844                         <field name="max_fine_rule" reporter:datatype="link"/>
4845                         <field name="opac_renewal" reporter:datatype="bool"/>
4846                         <field name="phone_renewal" reporter:datatype="bool"/>
4847                         <field name="recurring_fine" reporter:datatype="money" />
4848                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4849                         <field name="renewal_remaining" reporter:datatype="int" />
4850             <field name="grace_period" reporter:datatype="interval" />
4851                         <field name="stop_fines" reporter:datatype="text"/>
4852                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4853                         <field name="target_copy" reporter:datatype="link"/>
4854                         <field name="usr" reporter:datatype="link"/>
4855                         <field name="xact_finish" reporter:datatype="timestamp" />
4856                         <field name="xact_start" reporter:datatype="timestamp" />
4857                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4858                 </fields>
4859                 <links>
4860                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4861                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4862                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4863                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4864                 </links>
4865         </class>
4866         <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">
4867                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4868                         <field name="field" reporter:datatype="link"/>
4869                         <field name="id" reporter:datatype="id" />
4870                         <field name="source" reporter:datatype="link"/>
4871                         <field name="value" reporter:datatype="text"/>
4872                 </fields>
4873                 <links>
4874                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4875                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4876                 </links>
4877         </class>
4878         <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">
4879                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4880                         <field name="high" reporter:datatype="money" />
4881                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4882                         <field name="low" reporter:datatype="money" />
4883                         <field name="name" reporter:datatype="text"/>
4884                         <field name="normal" reporter:datatype="money" />
4885                         <field name="recurrence_interval" reporter:datatype="interval"/>
4886             <field name="grace_period" reporter:datatype="interval" />
4887                 </fields>
4888                 <links/>
4889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4890             <actions>
4891                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4892                 <retrieve/>
4893                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4894                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4895             </actions>
4896         </permacrud>
4897         </class>
4898         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4899                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4900                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4901                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4902                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4903                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4904                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4905                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4906                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4907                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4908                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4909                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4910                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4911                 </fields>
4912                 <links>
4913                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4914                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4915                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4916                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4917                 </links>
4918         </class>
4919         <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">
4920                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4921                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4922                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4923                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4924                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4925                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4926                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4927                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4928                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4929                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4930                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4931                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4932                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4933                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4934                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4935                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4936                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4937                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4938                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4939                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4940                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4941                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4942                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4943                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4944                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4945                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4946                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4947                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4948                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4949                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4950                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4951                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4952                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4953                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4954                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4955                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4956                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4957                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4958                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4959                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4960                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
4961                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4962                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
4963                 </fields>
4964                 <links>
4965                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4966                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4967                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4968                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4969                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4970                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4971                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4972                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4973                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4974                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4975                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4976                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4977                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4978                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4979                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
4980                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
4981                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
4982                 </links>
4983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4984             <actions>
4985                 <create permission="CREATE_COPY">
4986                     <context link="call_number" field="owning_lib"/>
4987                 </create>
4988                 <retrieve/>
4989                 <update permission="UPDATE_COPY">
4990                     <context link="call_number" field="owning_lib"/>
4991                 </update>
4992                 <delete permission="DELETE_COPY">
4993                     <context link="call_number" field="owning_lib"/>
4994                 </delete>
4995             </actions>
4996         </permacrud>
4997         </class>
4998
4999         <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">
5000                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5001                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5002                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5003                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5004                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5005                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5006                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5007                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5008                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5009                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
5010                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5011                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5012                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5013                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5014                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5015                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5016                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5017                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5018                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5019                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5020                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5021                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5022                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5023                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5024                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5025                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5026                 </fields>
5027                 <links>
5028                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5029                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5030                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5031                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5032                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5033                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5034                 </links>
5035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5036                         <actions>
5037                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5038                                 <retrieve />
5039                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5040                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5041                         </actions>
5042                 </permacrud>
5043         </class>
5044
5045         <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">
5046                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5047                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5048                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5049                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5050                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5051                 </fields>
5052                 <links/>
5053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5054             <actions>
5055                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5056                 <retrieve/>
5057                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5058                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5059             </actions>
5060         </permacrud>
5061         </class>
5062         <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">
5063                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5064                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5065                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5066                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5067                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5068                 </fields>
5069                 <links/>
5070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5071             <actions>
5072                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5073                 <retrieve/>
5074                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5075                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5076             </actions>
5077         </permacrud>
5078         </class>
5079         <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">
5080                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5081                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5082                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5083                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5084                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5085                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5086                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5087                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5088                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5089                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5090                 </fields>
5091                 <links>
5092                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5093                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5094                 </links>
5095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5096             <actions>
5097                 <create permission="CREATE_PERM" global_required="true"/>
5098                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5099                 <update permission="UPDATE_PERM" global_required="true"/>
5100                 <delete permission="DELETE_PERM" global_required="true"/>
5101             </actions>
5102         </permacrud>
5103         </class>
5104         <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">
5105                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5106                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5107                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5108                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5109                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5110                 </fields>
5111                 <links>
5112                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5113                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5114                 </links>
5115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5116             <actions>
5117                 <create permission="ADMIN_SURVEY">
5118                     <context link="question" jump="survey" field="owner"/>
5119                 </create>
5120                 <retrieve/>
5121                 <update permission="ADMIN_SURVEY">
5122                     <context link="question" jump="survey" field="owner"/>
5123                 </update>
5124                 <delete permission="ADMIN_SURVEY">
5125                     <context link="question" jump="survey" field="owner"/>
5126                 </delete>
5127             </actions>
5128         </permacrud>
5129         </class>
5130         <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">
5131                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5132                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5133                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5134                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5135                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5136                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5137                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5138                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5139                 </fields>
5140                 <links>
5141                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5142                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5143                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5144                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5145                 </links>
5146         </class>
5147         <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">
5148                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5149                         <field name="balance_owed" reporter:datatype="money" />
5150                         <field name="total_owed" reporter:datatype="money" />
5151                         <field name="total_paid" reporter:datatype="money" />
5152                         <field name="usr" reporter:datatype="link"/>
5153                 </fields>
5154                 <links>
5155                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5156                 </links>
5157         </class>
5158         <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">
5159                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5160                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5161                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5162                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5163                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5164                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5165                 </fields>
5166                 <links>
5167                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5168                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5169                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5170                 </links>
5171         </class>
5172         <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">
5173                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5174                         <field name="field" reporter:datatype="link"/>
5175                         <field name="id" reporter:datatype="id" />
5176                         <field name="source" reporter:datatype="link"/>
5177                         <field name="value" reporter:datatype="text"/>
5178                 </fields>
5179                 <links>
5180                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5181                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5182                 </links>
5183         </class>
5184         <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">
5185                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5186                         <field name="field" reporter:datatype="link"/>
5187                         <field name="id" reporter:datatype="id" />
5188                         <field name="source" reporter:datatype="link"/>
5189                         <field name="value" reporter:datatype="text"/>
5190                 </fields>
5191                 <links>
5192                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5193                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5194                 </links>
5195         </class>
5196         <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">
5197                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5198                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5199                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5200                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5201                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5202                 </fields>
5203                 <links>
5204                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5205                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5206                 </links>
5207         </class>
5208         <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">
5209                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5210                         <field name="depth" reporter:datatype="int" />
5211                         <field name="grantable" reporter:datatype="bool"/>
5212                         <field name="grp" reporter:datatype="link"/>
5213                         <field name="id" reporter:datatype="id" />
5214                         <field name="perm" reporter:datatype="link"/>
5215                 </fields>
5216                 <links>
5217                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5218                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5219                 </links>
5220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5221             <actions>
5222                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5223                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5224                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5225                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5226             </actions>
5227         </permacrud>
5228         </class>
5229         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5230                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5231                         <field name="items" oils_persist:virtual="true" />
5232                         <field name="btype" reporter:datatype="text"/>
5233                         <field name="id" reporter:datatype="id" />
5234                         <field name="name" reporter:datatype="text"/>
5235                         <field name="owner" reporter:datatype="link"/>
5236                         <field name="pub" reporter:datatype="bool"/>
5237                         <field name="create_time" reporter:datatype="timestamp" />
5238                 </fields>
5239                 <links>
5240                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5241                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5242                 </links>
5243         </class>
5244         <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">
5245                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5246                         <field name="id" reporter:datatype="id" />
5247                         <field name="bucket" reporter:datatype="link"/>
5248                         <field name="note" reporter:datatype="text" />
5249                 </fields>
5250                 <links>
5251                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5252                 </links>
5253         </class>
5254         <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">
5255                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5256                         <field name="id" reporter:datatype="int" />
5257                         <field name="usr" reporter:datatype="link"/>
5258                         <field name="work_ou" reporter:datatype="link"/>
5259                 </fields>
5260                 <links>
5261                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5262                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5263                 </links>
5264         </class>
5265         <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">
5266                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5267                         <field name="depth" reporter:datatype="int"/>
5268                         <field name="grantable" reporter:datatype="bool"/>
5269                         <field name="id" reporter:datatype="id" />
5270                         <field name="perm" reporter:datatype="link"/>
5271                         <field name="usr" reporter:datatype="link"/>
5272                 </fields>
5273                 <links>
5274                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5275                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5276                 </links>
5277         </class>
5278         <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">
5279                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5280                         <field name="object_id" reporter:datatype="text"/>
5281                         <field name="grantable" reporter:datatype="bool"/>
5282                         <field name="id" reporter:datatype="id" />
5283                         <field name="perm" reporter:datatype="link"/>
5284                         <field name="usr" reporter:datatype="link"/>
5285                         <field name="object_type" reporter:datatype="text"/>
5286                 </fields>
5287                 <links>
5288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5289                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5290                 </links>
5291         </class>
5292         <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">
5293                 <fields oils_persist:primary="id" oils_persist:sequence="">
5294                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5295                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5296                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5297                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5298                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5299                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5300                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5301                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5302                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5303                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5304                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5305                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5306                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5307                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5308                 </fields>
5309                 <links>
5310                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5311                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5312                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5313                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5314                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5315                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5316                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5317                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5318                 </links>
5319         </class>
5320         <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">
5321                 <fields oils_persist:primary="id" oils_persist:sequence="">
5322                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5323                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5324                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5325                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5326                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5327                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5328                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5329                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5330                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5331                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5332                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5333                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5334                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5335                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5336                 </fields>
5337                 <links>
5338                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5339                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5340                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5341                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5342                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5343                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5344                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5345                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5346                 </links>
5347         </class>
5348         <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">
5349                 <fields oils_persist:primary="id" oils_persist:sequence="">
5350                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5351                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5352                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5353                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5354                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5355                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5356                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5357                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5358                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5359                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5360                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5361                 </fields>
5362                 <links>
5363                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5364                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5365                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5366                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5367                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5368                 </links>
5369         </class>
5370         <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">
5371                 <fields oils_persist:primary="id" oils_persist:sequence="">
5372                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5373                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5374                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5375                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5376                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5377                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5378                         <field reporter:label="Accepting User" name="accepting_usr" />
5379                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5380                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5381                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5382                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5383                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5384                 </fields>
5385                 <links>
5386                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5387                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5388                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5389                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5390                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5391                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5392                 </links>
5393         </class>
5394         <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">
5395                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5396                         <field name="bucket" reporter:datatype="link"/>
5397                         <field name="id" reporter:datatype="id" />
5398                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5399                         <field name="create_time" reporter:datatype="timestamp" />
5400                         <field name="pos" reporter:datatype="int" />
5401                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5402                 </fields>
5403                 <links>
5404                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5405                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5406             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5407                 </links>
5408         </class>
5409         <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">
5410                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5411                         <field name="id" reporter:datatype="id" />
5412                         <field name="item" reporter:datatype="link"/>
5413                         <field name="note" reporter:datatype="text" />
5414                 </fields>
5415                 <links>
5416                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5417                 </links>
5418         </class>
5419         <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">
5420                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5421                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5422                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5423                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5424                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5425                 </fields>
5426                 <links>
5427                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5429                 </links>
5430         </class>
5431     <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">
5432         <fields oils_persist:primary="field">
5433             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5434             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5435             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5436         </fields>
5437         <links/>
5438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5439             <actions>
5440                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5441                 <retrieve />
5442                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5443                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5444             </actions>
5445         </permacrud>
5446     </class>
5447         <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">
5448                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5449                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5450                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5451                 </fields>
5452                 <links/>
5453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5454             <actions>
5455                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5456                 <retrieve/>
5457                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5458                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5459             </actions>
5460         </permacrud>
5461         </class>
5462
5463
5464         <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">
5465                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5466                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5467                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5468                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5469                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5470                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5471                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5472                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5473                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5474                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5475                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5476                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5477                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5478                 </fields>
5479                 <links>
5480                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5481                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5482                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5483                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5484                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5485                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5486                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5487                 </links>
5488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5489             <actions>
5490                 <create permission="TRANSIT_COPY">
5491                     <context link="target_copy" field="owner"/>
5492                 </create>
5493                 <retrieve/>
5494                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5495                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5496             </actions>
5497         </permacrud>
5498         </class>
5499         <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">
5500                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5501                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5502                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5503                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5504                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5505                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5506                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5507                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5508                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5509                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5510                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5511                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5512                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5513                 </fields>
5514                 <links>
5515                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5516                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5517                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5518                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5519                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5520                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5521                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5522                 </links>
5523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5524             <actions>
5525                 <create permission="TRANSIT_COPY" context_field="owner">
5526                     <context link="target_copy" field="circ_lib"/>
5527                 </create>
5528                 <retrieve/>
5529                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5530                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5531             </actions>
5532         </permacrud>
5533         </class>
5534         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5535                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5536                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5537                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5539                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5540                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5541                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5543                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5544                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5545                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5546                 </fields>
5547                 <links>
5548                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5549                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5550                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5551                 </links>
5552         </class>
5553         <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">
5554                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5555                         <field name="grp" />
5556                         <field name="id" reporter:datatype="id" />
5557                         <field name="usr" />
5558                 </fields>
5559                 <links>
5560                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5561                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5562                 </links>
5563         </class>
5564         <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">
5565                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5566                         <field name="id" reporter:datatype="id" />
5567                         <field name="fq_field" reporter:datatype="text"/>
5568                         <field name="identity_value" reporter:datatype="text"/>
5569                         <field name="translation" reporter:datatype="text"/>
5570                         <field name="string" reporter:datatype="text"/>
5571                 </fields>
5572                 <links>
5573                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5574                 </links>
5575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5576             <actions>
5577                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5578                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5579                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5580                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5581             </actions>
5582         </permacrud>
5583         </class>
5584         <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">
5585                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5586                         <field name="id" reporter:datatype="id" />
5587                         <field name="fm_class" reporter:datatype="text"/>
5588                         <field name="field" reporter:datatype="text"/>
5589                         <field name="owner" reporter:datatype="org_unit"/>
5590                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5591                 </fields>
5592                 <links>
5593                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5594                 </links>
5595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5596             <actions>
5597                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5598                 <retrieve/>
5599                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5600                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5601             </actions>
5602         </permacrud>
5603         </class>
5604         <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">
5605                 <fields oils_persist:primary="code">
5606                         <field name="code" reporter:datatype="id" />
5607                         <field name="marc_code" reporter:datatype="text"/>
5608                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5609                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5610                 </fields>
5611                 <links/>
5612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5613             <actions>
5614                 <create permission="CREATE_LOCALE" global_required="true"/>
5615                 <retrieve/>
5616                 <update permission="UPDATE_LOCALE" global_required="true"/>
5617                 <delete permission="DELETE_LOCALE" global_required="true"/>
5618             </actions>
5619         </permacrud>
5620         </class>
5621         <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">
5622                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5623                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5624                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5625                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5626             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5627                 </fields>
5628                 <links>
5629                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5630                 </links>
5631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5632             <actions>
5633                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5634                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5635                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5636                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5637             </actions>
5638         </permacrud>
5639         </class>
5640
5641         <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">
5642                 <fields oils_persist:primary="id">
5643                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5644                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5645                 </fields>
5646                 <links/>
5647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5648             <actions>
5649                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5650                 <retrieve/>
5651                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5652                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5653             </actions>
5654         </permacrud>
5655         </class>
5656
5657         <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">
5658                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5659                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5660                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5661                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5662                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5663                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5664                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5665                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5666                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5667                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5668                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5669                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5670                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5671                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5672                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5673                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5674                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5675                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5676                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5677                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5678                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5679                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5680                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5681                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5682                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5683                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5684                 </fields>
5685                 <links>
5686                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5687                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5688                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5689                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5690                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5691                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5692                 </links>
5693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5694             <actions>
5695                 <create permission="user_request.create">
5696                     <context link="usr" field="home_ou"/>
5697                                 </create>
5698                 <retrieve permission="user_request.view">
5699                     <context link="usr" field="home_ou"/>
5700                                 </retrieve>
5701                 <update permission="user_request.update">
5702                     <context link="usr" field="home_ou"/>
5703                                 </update>
5704                 <delete permission="user_request.delete">
5705                     <context link="usr" field="home_ou"/>
5706                                 </delete>
5707             </actions>
5708         </permacrud>
5709         </class>
5710
5711         <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">
5712                 <fields oils_persist:primary="code">
5713                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5714                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5715                 </fields>
5716                 <links/>
5717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5718             <actions>
5719                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5720                 <retrieve/>
5721                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5722                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5723             </actions>
5724         </permacrud>
5725         </class>
5726
5727         <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">
5728                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5729                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5730                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5731                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5732                         <field reporter:label="Ratio" name="ratio" />
5733                 </fields>
5734                 <links>
5735                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5736                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5737                 </links>
5738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5739                         <actions>
5740                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5741                                 <retrieve/>
5742                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5743                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5744                         </actions>
5745                 </permacrud>
5746         </class>
5747
5748         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5750                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5751                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5752                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5753                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5754                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5755                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5756                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5757                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5758                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5759                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5760                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5761                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5762                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5763                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5764                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5765                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5766                 </fields>
5767                 <links>
5768                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5769                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5770             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5771             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5772             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5773                 </links>
5774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5775             <actions>
5776                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5777                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5778                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5779                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5780             </actions>
5781         </permacrud>
5782         </class>
5783
5784         <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">
5785                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5786                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5787                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5788                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5789                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5790                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5791                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5792                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5793                 </fields>
5794                 <links>
5795                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5796                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5797                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5798                 </links>
5799         </class>
5800
5801         <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">
5802                 <fields oils_persist:primary="code">
5803                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5804                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5805                 </fields>
5806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5807             <actions>
5808                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5809                 <retrieve/>
5810                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5811                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5812             </actions>
5813                 </permacrud>
5814         </class>
5815
5816         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5817                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5818                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5819                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5820                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5821                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5822                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5823                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5824                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5825                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5826                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5827                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5828                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5829                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5830                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5831                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5832                 </fields>
5833                 <links>
5834                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5835                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5836                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5837                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5838                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5839                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5840                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5841                 </links>
5842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5843             <actions>
5844                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5845                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5846                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5847                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5848             </actions>
5849         </permacrud>
5850         </class>
5851
5852         <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">
5853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5854                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5855                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5856                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5857                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5858                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5859                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5860                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5861                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5862                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5863                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5864                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5865                 </fields>
5866                 <links>
5867                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5868                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5869                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5870                 </links>
5871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5872             <actions>
5873                 <create   permission="ADMIN_INVOICE">
5874                                         <context link="invoice" field="receiver"/>
5875                                 </create>
5876                 <retrieve permission="ADMIN_INVOICE">
5877                                         <context link="invoice" field="receiver"/>
5878                                 </retrieve>
5879                 <update   permission="ADMIN_INVOICE">
5880                                         <context link="invoice" field="receiver"/>
5881                                 </update>
5882                                 <delete   permission="ADMIN_INVOICE">
5883                                         <context link="invoice" field="receiver"/>
5884                                 </delete>
5885             </actions>
5886         </permacrud>
5887         </class>
5888
5889         <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">
5890                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5891                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5892                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5893                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5894                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5895                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5896                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5897                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5898                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5899                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5900                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5901                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5902                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5903                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5904                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5905                 </fields>
5906                 <links>
5907                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5908                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5909                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5910                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5911                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5912                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5913                 </links>
5914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5915             <actions>
5916                 <create   permission="ADMIN_INVOICE">
5917                                         <context link="invoice" field="receiver"/>
5918                                 </create>
5919                 <retrieve permission="ADMIN_INVOICE">
5920                                         <context link="invoice" field="receiver"/>
5921                                 </retrieve>
5922                 <update   permission="ADMIN_INVOICE">
5923                                         <context link="invoice" field="receiver"/>
5924                                 </update>
5925                                 <delete   permission="ADMIN_INVOICE">
5926                                         <context link="invoice" field="receiver"/>
5927                                 </delete>
5928             </actions>
5929         </permacrud>
5930         </class>
5931
5932         <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">
5933                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5934                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5935                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5936                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5937                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5938                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5939                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5940                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5941                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5942                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5943                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5944                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5945                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5946                 </fields>
5947                 <links>
5948                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5949                 </links>
5950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5951             <actions>
5952                 <create permission="ADMIN_PROVIDER">
5953                     <context link="provider" field="owner"/>
5954                 </create>
5955                 <retrieve permission="ADMIN_PROVIDER">
5956                     <context link="provider" field="owner"/>
5957                 </retrieve>
5958                 <update permission="ADMIN_PROVIDER">
5959                     <context link="provider" field="owner"/>
5960                 </update>
5961                 <delete permission="ADMIN_PROVIDER">
5962                     <context link="provider" field="owner"/>
5963                 </delete>
5964             </actions>
5965         </permacrud>
5966         </class>
5967
5968         <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">
5969                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5970                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5971                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5972                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5973                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5974                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5975                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5976         </fields>
5977                 <links>
5978                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5979                 </links>
5980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5981             <actions>
5982                 <create permission="ADMIN_PROVIDER">
5983                     <context link="provider" field="owner"/>
5984                 </create>
5985                 <retrieve permission="ADMIN_PROVIDER">
5986                     <context link="provider" field="owner"/>
5987                 </retrieve>
5988                 <update permission="ADMIN_PROVIDER">
5989                     <context link="provider" field="owner"/>
5990                 </update>
5991                 <delete permission="ADMIN_PROVIDER">
5992                     <context link="provider" field="owner"/>
5993                 </delete>
5994             </actions>
5995         </permacrud>
5996     </class>
5997         <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">
5998                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5999                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6000                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6001                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6002                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6003                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6004                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6005                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6006                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6007                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6008                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6009                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6010                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6011                 </fields>
6012                 <links>
6013                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6014                 </links>
6015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6016             <actions>
6017                 <create permission="ADMIN_PROVIDER">
6018                     <context link="contact" jump='provider' field="owner"/>
6019                 </create>
6020                 <retrieve permission="ADMIN_PROVIDER">
6021                     <context link="contact" jump='provider' field="owner"/>
6022                 </retrieve>
6023                 <update permission="ADMIN_PROVIDER">
6024                     <context link="contact" jump='provider' field="owner"/>
6025                 </update>
6026                 <delete permission="ADMIN_PROVIDER">
6027                     <context link="contact" jump='provider' field="owner"/>
6028                 </delete>
6029             </actions>
6030         </permacrud>
6031         </class>
6032
6033         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6034                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6035                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6036                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6037                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6038                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6039                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6040                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6041                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6042                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6043                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6044                 </fields>
6045                 <links>
6046                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6047                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6048                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6049                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6050                 </links>
6051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6052                 </permacrud>
6053         </class>
6054
6055         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6056                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6057                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6058                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6059                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6060                 </fields>
6061                 <links>
6062             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6063                 </links>
6064                 <!--
6065                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6066                         But here's what it should look like if we ever do use pcrud.
6067                 -->
6068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6069                         <actions>
6070                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6071                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6072                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6073                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6074                         </actions>
6075                 </permacrud>
6076         </class>
6077
6078         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6079                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6080                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6081                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6082                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6083                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6084                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6085                 </fields>
6086                 <links>
6087                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6088                 </links>
6089                 <!--
6090                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6091                         But here's what it should look like if we ever do use pcrud.
6092                 -->
6093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6094                         <actions>
6095                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6096                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6097                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6098                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6099                         </actions>
6100                 </permacrud>
6101         </class>
6102
6103         <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">
6104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6105                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6106                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6107                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6108                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6109                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6110                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6111                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6112                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6113                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6114                 </fields>
6115                 <links>
6116                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6117                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6118             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6119             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6120                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6121                 </links>
6122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6123             <actions>
6124                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6125                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6126                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6127                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6128             </actions>
6129         </permacrud>
6130         </class>
6131
6132         <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">
6133                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6134                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6135                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6136                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6137                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6138                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6139                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6140                 </fields>
6141                 <links>
6142                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6143                 </links>
6144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6145                         <actions>
6146                                 <create permission="ADMIN_FUNDING_SOURCE">
6147                     <context link="funding_source" field="owner"/>
6148                 </create>
6149                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6150                     <context link="funding_source" field="owner"/>
6151                 </retrieve>
6152                                 <update permission="ADMIN_FUNDING_SOURCE">
6153                     <context link="funding_source" field="owner"/>
6154                 </update>
6155                                 <delete permission="ADMIN_FUNDING_SOURCE">
6156                     <context link="funding_source" field="owner"/>
6157                 </delete>
6158                         </actions>
6159                 </permacrud>
6160         </class>
6161
6162         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
6163                 <fields oils_persist:primary="id">
6164                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6165                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6166                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6167                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6168                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6169                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6170                 </fields>
6171                 <links>
6172                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6173                 </links>
6174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6175                 </permacrud>
6176         </class>
6177
6178         <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">
6179                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6180                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6181                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6182                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6183                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6184                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6185                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6186                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6187                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6188                 </fields>
6189                 <links>
6190                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6191                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6192                 </links>
6193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6194                         <actions>
6195                                 <create permission="ADMIN_ACQ_FUND">
6196                     <context link="fund" field="org"/>
6197                 </create>
6198                                 <retrieve permission="ADMIN_ACQ_FUND">
6199                     <context link="fund" field="org"/>
6200                 </retrieve>
6201                                 <update permission="ADMIN_ACQ_FUND">
6202                     <context link="fund" field="org"/>
6203                 </update>
6204                                 <delete permission="ADMIN_ACQ_FUND">
6205                     <context link="fund" field="org"/>
6206                 </delete>
6207                         </actions>
6208                 </permacrud>
6209         </class>
6210
6211         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6213                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6214                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6215                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6216                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6217                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6218                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6219                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6220                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6221                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6222                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6223                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6224                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6225                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6226                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6227                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6228                 </fields>
6229                 <links>
6230                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6231                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6232             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6233             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6234             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6235                 </links>
6236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6237             <actions>
6238                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6239                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6240                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6241                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6242             </actions>
6243         </permacrud>
6244         </class>
6245
6246         <class id="acqfat" controller="open-ils.cstore 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">
6247                 <fields oils_persist:primary="fund">
6248                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6249                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6250                 </fields>
6251                 <links>
6252                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6253                 </links>
6254         </class>
6255
6256         <class id="acqfdt" controller="open-ils.cstore 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">
6257                 <fields oils_persist:primary="fund">
6258                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6259                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6260                 </fields>
6261                 <links>
6262                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6263                 </links>
6264         </class>
6265
6266         <class id="acqfet" controller="open-ils.cstore 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">
6267                 <fields oils_persist:primary="fund">
6268                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6269                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6270                 </fields>
6271                 <links>
6272                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6273                 </links>
6274         </class>
6275
6276         <class id="acqfst" controller="open-ils.cstore 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">
6277                 <fields oils_persist:primary="fund">
6278                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6279                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6280                 </fields>
6281                 <links>
6282                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6283                 </links>
6284         </class>
6285
6286         <class id="acqfcb" controller="open-ils.cstore 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">
6287                 <fields oils_persist:primary="fund">
6288                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6289                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6290                 </fields>
6291                 <links>
6292                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6293                 </links>
6294         </class>
6295
6296    <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">
6297         <fields oils_persist:primary="fund">
6298             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6299             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6300         </fields>
6301         <links>
6302             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6303         </links>
6304     </class>
6305
6306    <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">
6307         <fields oils_persist:primary="fund">
6308             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6309             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6310         </fields>
6311         <links>
6312             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6313         </links>
6314     </class>
6315
6316    <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">
6317         <fields oils_persist:primary="fund">
6318             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6319             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6320         </fields>
6321         <links>
6322             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6323         </links>
6324     </class>
6325
6326    <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">
6327         <fields oils_persist:primary="fund">
6328             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6329             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6330         </fields>
6331         <links>
6332             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6333         </links>
6334     </class>
6335
6336    <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">
6337         <fields oils_persist:primary="fund">
6338             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6339             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6340         </fields>
6341         <links>
6342             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6343         </links>
6344     </class>
6345
6346         <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">
6347                 <fields oils_persist:primary="funding_source">
6348                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6349                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6350                 </fields>
6351                 <links>
6352                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6353                 </links>
6354         </class>
6355
6356         <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">
6357                 <fields oils_persist:primary="funding_source">
6358                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6359                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6360                 </fields>
6361                 <links>
6362                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6363                 </links>
6364         </class>
6365
6366         <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">
6367                 <fields oils_persist:primary="funding_source">
6368                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6369                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6370                 </fields>
6371                 <links>
6372                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6373                 </links>
6374         </class>
6375
6376         <class id="acqfsb" controller="open-ils.cstore 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">
6377                 <fields oils_persist:primary="fund">
6378                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6379                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6380                 </fields>
6381                 <links>
6382                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6383                 </links>
6384         </class>
6385
6386         <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">
6387                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6388                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6389                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6390                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6391                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6392                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6393                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6394                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6395                 </fields>
6396                 <links>
6397                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6398                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6399                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6400                 </links>
6401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6402                         <actions>
6403                                 <create permission="ADMIN_ACQ_FUND">
6404                     <context link="fund" field="org"/>
6405                 </create>
6406                                 <retrieve permission="ADMIN_ACQ_FUND">
6407                     <context link="fund" field="org"/>
6408                 </retrieve>
6409                                 <update permission="ADMIN_ACQ_FUND">
6410                     <context link="fund" field="org"/>
6411                 </update>
6412                                 <delete permission="ADMIN_ACQ_FUND">
6413                     <context link="fund" field="org"/>
6414                 </delete>
6415                         </actions>
6416                 </permacrud>
6417         </class>
6418
6419     <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">
6420         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6421             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6422             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6423             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6424             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6425             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6426             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6427             <field reporter:label="Note" name="note" reporter:datatype="text" />
6428             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6429         </fields>
6430         <links>
6431             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6432             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6433             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6434         </links>
6435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6436                         <actions>
6437                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6438                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6439                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6440                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6441                         </actions>
6442                 </permacrud>
6443     </class>
6444
6445         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6447                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6448                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6449                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6450                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6451                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6452                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6453                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6454                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6455                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6456                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6457                 </fields>
6458                 <links>
6459                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6461                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6462                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6463                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6464                 </links>
6465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6466                         <actions>
6467                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6468                         </actions>
6469                 </permacrud>
6470         </class>
6471
6472         <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">
6473                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6474                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6475                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6476                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6477                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6478                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6479                 </fields>
6480                 <links>
6481                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6482                 </links>
6483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6484                         <actions>
6485                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6486                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6487                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6488                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6489                         </actions>
6490                 </permacrud>
6491         </class>
6492
6493         <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">
6494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6495                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6496                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6497                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6498                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6499                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6500                         <field reporter:label="State" name="state" reporter:datatype="text" />
6501                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6502                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6503                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6504                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6505                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6506                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6507                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6508                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6509                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6510                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6511                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6512                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6513                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6514                 </fields>
6515                 <links>
6516                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6517                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6518                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6519                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6520                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6521                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6522                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6523                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6524                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6525                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6526                 </links>
6527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528                         <actions>
6529                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6530                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6531                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6532                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6533                         </actions>
6534                 </permacrud>
6535         </class>
6536
6537         <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">
6538                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6539                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6540                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6541                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6542                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6543                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6544                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6545                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6546                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6547                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6548                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6549                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6550                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6551                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6552                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6553                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6554                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6555                 </fields>
6556                 <links>
6557                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6558                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6559                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6560                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6561                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6562                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6563                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6564                 </links>
6565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6566             <actions>
6567                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6568             </actions>
6569                 </permacrud>
6570         </class>
6571
6572         <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">
6573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6574                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6575                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6576                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6577                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6578                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6579                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6580                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6581                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6582                 </fields>
6583                 <links>
6584                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6585                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6586                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6587                 </links>
6588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6589             <actions>
6590                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6591                     <context link="purchase_order" field="ordering_agency"/>
6592                 </retrieve>
6593                 <create permission="CREATE_PURCHASE_ORDER">
6594                     <context link="purchase_order" field="ordering_agency"/>
6595                 </create>
6596                 <update permission="CREATE_PURCHASE_ORDER">
6597                     <context link="purchase_order" field="ordering_agency"/>
6598                 </update>
6599                 <delete permission="CREATE_PURCHASE_ORDER">
6600                     <context link="purchase_order" field="ordering_agency"/>
6601                 </delete>
6602             </actions>
6603                 </permacrud>
6604         </class>
6605
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6608                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6609                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6610                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6611                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6612                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6613                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6614                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6615                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6616                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6617                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6618                 </fields>
6619                 <links>
6620                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6621                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6622                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6623                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6624                 </links>
6625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6626             <actions>
6627                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6628                     <context link="purchase_order" field="ordering_agency"/>
6629                 </retrieve>
6630                 <create permission="CREATE_PURCHASE_ORDER">
6631                     <context link="purchase_order" field="ordering_agency"/>
6632                 </create>
6633                 <update permission="CREATE_PURCHASE_ORDER">
6634                     <context link="purchase_order" field="ordering_agency"/>
6635                 </update>
6636                 <delete permission="CREATE_PURCHASE_ORDER">
6637                     <context link="purchase_order" field="ordering_agency"/>
6638                 </delete>
6639             </actions>
6640                 </permacrud>
6641         </class>
6642
6643         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6644                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6645                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6646                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6647                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6648                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6649                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6650                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6651                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6652                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6653                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6654                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6655                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6656                         <field reporter:label="State" name="state" reporter:datatype="text" />
6657                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6658                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6659                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6660                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6661                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6662                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6663                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6664                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6665                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6666                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6667                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6668                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6669                 </fields>
6670                 <links>
6671                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6672                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6673                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6674                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6675                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6676                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6677                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6678                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6679                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6680                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6681                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6682                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6683                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6684                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6685                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6686                 </links>
6687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6688                         <actions>
6689                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6690                                         <context link="purchase_order" field="ordering_agency"/>
6691                                         <context link="picklist" field="org_unit"/>
6692                                 </retrieve>
6693                         </actions>
6694                 </permacrud>
6695         </class>
6696
6697         <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">
6698                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6699                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6700                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6701                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6702                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6703                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6704                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6705                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6706                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6707                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6708                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6709                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6710                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6711                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6712                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6713                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6714                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6715                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6716                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6717                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6718                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6719                 </fields>
6720                 <links>
6721                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6722                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6723                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6724                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6725                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6726                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6727                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6728                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6729                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6730                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6731                 </links>
6732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6733                         <actions>
6734                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6735                                         <context link="purchase_order" field="ordering_agency"/>
6736                                         <context link="picklist" field="org_unit"/>
6737                                 </retrieve>
6738                         </actions>
6739                 </permacrud>
6740         </class>
6741
6742         <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">
6743                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6744                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6745                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6746                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6747                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6748                 </fields>
6749                 <links>
6750                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6751                 </links>
6752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6753                         <actions>
6754                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6755                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6756                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6757                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6758                         </actions>
6759                 </permacrud>
6760         </class>
6761
6762         <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">
6763                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6764                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6765                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6766                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6767                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6768                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6769                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6770                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6771                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6772                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6773                 </fields>
6774                 <links>
6775                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6776                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6777                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6778                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6779                 </links>
6780         </class>
6781
6782         <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">
6783                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6784                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6785                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6786                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6787                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6788                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6789                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6790                 </fields>
6791                 <links>
6792                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6793                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6794                 </links>
6795         </class>
6796
6797         <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">
6798                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6799                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6800                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6801                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6802                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6803                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6804                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6805                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6806                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6807                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6808                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6809                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6810                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6811                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6812                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6813                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6814                 </fields>
6815                 <links>
6816                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6817                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6818                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6819                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6820                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6821                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6822                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6823                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6824                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6825                 </links>
6826         </class>
6827
6828         <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">
6829                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6830                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6831                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6832                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6833                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6834                 </fields>
6835                 <links/>
6836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6837                         <actions>
6838                                 <retrieve />
6839                         </actions>
6840                 </permacrud>
6841         </class>
6842
6843         <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">
6844                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6845                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6846                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6847                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6848                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6849                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6850             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6851                 </fields>
6852                 <links/>
6853         <permacrud>
6854             <actions>
6855                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6856                 <retrieve />
6857                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6858                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6859             </actions>
6860         </permacrud>
6861         </class>
6862
6863         <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">
6864                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6865                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6866                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6867                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6868                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6869                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6870                 </fields>
6871                 <links/>
6872         </class>
6873         <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">
6874                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6875                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6876                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6877                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6878                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6879                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6880                 </fields>
6881                 <links>
6882                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6883                 </links>
6884         </class>
6885
6886         <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">
6887             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6888                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6889                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6890                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6891                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6892                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6893                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6894         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6895
6896             </fields>
6897             <links>
6898                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6899             </links>
6900             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6901                 <actions>
6902                     <create permission="ADMIN_PROVIDER">
6903                         <context link="provider" field="owner"/>
6904                     </create>
6905                     <retrieve permission="ADMIN_PROVIDER">
6906                         <context link="provider" field="owner"/>
6907                     </retrieve>
6908                     <update permission="ADMIN_PROVIDER">
6909                         <context link="provider" field="owner"/>
6910                     </update>
6911                     <delete permission="ADMIN_PROVIDER">
6912                         <context link="provider" field="owner"/>
6913                     </delete>
6914                 </actions>
6915             </permacrud>
6916         </class>
6917         
6918         <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">
6919             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6920                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6921                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6922                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6923                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6924             </fields>
6925             <links>
6926                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6927             </links>
6928             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6929                 <actions>
6930                     <create permission="ADMIN_PROVIDER">
6931                         <context link="provider" field="owner"/>
6932                     </create>
6933                     <retrieve permission="ADMIN_PROVIDER">
6934                         <context link="provider" field="owner"/>
6935                     </retrieve>
6936                     <update permission="ADMIN_PROVIDER">
6937                         <context link="provider" field="owner"/>
6938                     </update>
6939                     <delete permission="ADMIN_PROVIDER">
6940                         <context link="provider" field="owner"/>
6941                     </delete>
6942                 </actions>
6943             </permacrud>
6944         </class>
6945         
6946         <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">
6947             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6948                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6949                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6950                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6951                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6952                 </fields>
6953                 <links/>
6954         </class>
6955
6956         <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">
6957                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6958                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6959                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6960                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6961                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6962                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6963                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6964                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6965                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6966                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6967                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6968                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6969                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6970                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6971                 </fields>
6972                 <links>
6973                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6974                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6975                 </links>
6976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6977             <actions>
6978                 <create permission="ADMIN_PROVIDER">
6979                     <context link="provider" field="owner"/>
6980                 </create>
6981                 <retrieve permission="ADMIN_PROVIDER">
6982                     <context link="provider" field="owner"/>
6983                 </retrieve>
6984                 <update permission="ADMIN_PROVIDER">
6985                     <context link="provider" field="owner"/>
6986                 </update>
6987                 <delete permission="ADMIN_PROVIDER">
6988                     <context link="provider" field="owner"/>
6989                 </delete>
6990             </actions>
6991         </permacrud>
6992         </class>
6993
6994         <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">
6995                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6996                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6997                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6998                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6999                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7000                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7001                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7002                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7003                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7004                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7005                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7006                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7007                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7008                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7009                 </fields>
7010                 <links>
7011                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7012                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7013                 </links>
7014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7015             <actions>
7016                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7017                     <context link="account" jump="provider" field="owner"/>
7018                 </retrieve>
7019                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7020                     <context link="account" jump="provider" field="owner"/>
7021                 </update>
7022                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7023                     <context link="account" jump="provider" field="owner"/>
7024                 </delete>
7025             </actions>
7026         </permacrud>
7027         </class>
7028
7029
7030         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7031                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7032                         <field name="id" reporter:datatype="id" />
7033                         <field name="parent" reporter:datatype="link"/>
7034                         <field name="owner" reporter:datatype="link"/>
7035                         <field name="create_time" reporter:datatype="timestamp"/>
7036                         <field name="name" reporter:datatype="text"/>
7037                         <field name="shared" reporter:datatype="bool"/>
7038                         <field name="share_with" reporter:datatype="link"/>
7039                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7040                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7041                 </fields>
7042                 <links>
7043                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7044                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7045                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7046                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7047                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7048                 </links>
7049         </class>
7050         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7051                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7052                         <field name="id" reporter:datatype="id" />
7053                         <field name="parent" reporter:datatype="link"/>
7054                         <field name="owner" reporter:datatype="link"/>
7055                         <field name="create_time" reporter:datatype="timestamp"/>
7056                         <field name="name" reporter:datatype="text"/>
7057                         <field name="shared" reporter:datatype="bool"/>
7058                         <field name="share_with" reporter:datatype="link"/>
7059                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7061                 </fields>
7062                 <links>
7063                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7064                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7065                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7066                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7067                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7068                 </links>
7069         </class>
7070         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7071                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7072                         <field name="id" reporter:datatype="id" />
7073                         <field name="parent" reporter:datatype="link"/>
7074                         <field name="owner" reporter:datatype="link"/>
7075                         <field name="create_time" reporter:datatype="timestamp"/>
7076                         <field name="name" reporter:datatype="text"/>
7077                         <field name="shared" reporter:datatype="bool"/>
7078                         <field name="share_with" reporter:datatype="link"/>
7079                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7080                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7081                 </fields>
7082                 <links>
7083                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7084                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7085                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7086                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7087                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7088                 </links>
7089         </class>
7090         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7091                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7092                         <field name="id" reporter:datatype="id" />
7093                         <field name="owner" reporter:datatype="link"/>
7094                         <field name="create_time" reporter:datatype="timestamp"/>
7095                         <field name="name" reporter:datatype="text"/>
7096                         <field name="data" reporter:datatype="text"/>
7097                         <field name="folder" reporter:datatype="link"/>
7098                         <field name="description" reporter:datatype="text"/>
7099                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7100                 </fields>
7101                 <links>
7102                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7103                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7104                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7105                 </links>
7106         </class>
7107         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7108                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7109                         <field name="id" reporter:datatype="id" />
7110                         <field name="owner" reporter:datatype="link"/>
7111                         <field name="create_time" reporter:datatype="timestamp"/>
7112                         <field name="template" reporter:datatype="link"/>
7113                         <field name="data" reporter:datatype="text"/>
7114                         <field name="folder" reporter:datatype="link"/>
7115                         <field name="recur" reporter:datatype="bool"/>
7116                         <field name="recurrence" reporter:datatype="interval"/>
7117                         <field name="name" reporter:datatype="text"/>
7118                         <field name="description" reporter:datatype="text"/>
7119                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7120                 </fields>
7121                 <links>
7122                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7123                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7124                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7125                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7126                 </links>
7127         </class>
7128         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7129                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7130                         <field name="id" reporter:datatype="id" />
7131                         <field name="runner" reporter:datatype="link"/>
7132                         <field name="start_time" reporter:datatype="timestamp"/>
7133                         <field name="complete_time" reporter:datatype="timestamp"/>
7134                         <field name="run_time" reporter:datatype="timestamp"/>
7135                         <field name="email" reporter:datatype="text"/>
7136                         <field name="excel_format" reporter:datatype="bool"/>
7137                         <field name="csv_format" reporter:datatype="bool"/>
7138                         <field name="html_format" reporter:datatype="bool"/>
7139                         <field name="error_code" reporter:datatype="int"/>
7140                         <field name="error_text" reporter:datatype="text"/>
7141                         <field name="report" reporter:datatype="link"/>
7142                         <field name="folder" reporter:datatype="link"/>
7143                         <field name="chart_pie" reporter:datatype="bool"/>
7144                         <field name="chart_bar" reporter:datatype="bool"/>
7145                         <field name="chart_line" reporter:datatype="bool"/>
7146                 </fields>
7147                 <links>
7148                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7149                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7150                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7151                 </links>
7152         </class>
7153         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7154                 <fields oils_persist:primary="id">
7155                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7156                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7157                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7158                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7159                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7160                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7161                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7162                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7163                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7164                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7165                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7166                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7167                 </fields>
7168                 <links>
7169                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7170                 </links>
7171         </class>
7172         <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">
7173                 <fields oils_persist:primary="id">
7174                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7175                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7176                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7177                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7178                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7179                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7180                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7181                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7182                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7183                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7184                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7185                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7186                 </fields>
7187                 <links>
7188                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7189                 </links>
7190         </class>
7191         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7192                 <fields oils_persist:primary="id">
7193                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7194                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7195                         <field reporter:label="Fingerprint" name="fingerprint" />
7196                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7197                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7198                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7199                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7200                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7201                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7202                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7203                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7204                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7205                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7206                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7207                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7208                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7209                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7210                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7211                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7212                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7213                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7214                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7215                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7216                 </fields>
7217                 <links>
7218                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7219                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7220                 </links>
7221         </class>
7222         <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">
7223                 <fields oils_persist:primary="id">
7224                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7225                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7226                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7227                 </fields>
7228                 <links>
7229                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7230                 </links>
7231         </class>
7232         <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">
7233                 <fields oils_persist:primary="id">
7234                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7235                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7236                 </fields>
7237                 <links>
7238                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7239                 </links>
7240         </class>
7241         <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">
7242                 <fields oils_persist:primary="id">
7243                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7244                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7245                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7246                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7247                 </fields>
7248                 <links>
7249                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7250                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7251                 </links>
7252         </class>
7253         <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">
7254                 <fields oils_persist:primary="xact">
7255                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7256                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7257                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7258                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7259                 </fields>
7260                 <links>
7261                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7262                 </links>
7263         </class>
7264         <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">
7265                 <fields oils_persist:primary="xact">
7266                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7267                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7268                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7269                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7270                 </fields>
7271                 <links>
7272                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7273                 </links>
7274         </class>
7275         <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)">
7276                 <fields oils_persist:primary="id">
7277                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7278                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7279                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7280                 </fields>
7281                 <links>
7282                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7283                 </links>
7284         </class>
7285         <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">
7286                 <fields oils_persist:primary="id">
7287                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7288                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7289                 </fields>
7290                 <links>
7291                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7292                 </links>
7293         </class>
7294         <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">
7295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7296                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7297                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7298                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7299                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7300                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7301                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7302                 </fields>
7303                 <links>
7304                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7305                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7306                 </links>
7307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7308                         <actions>
7309                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7310                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7311                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7312                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7313                         </actions>
7314                 </permacrud>
7315         </class>
7316         <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">
7317                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7318                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7319                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7320                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7321                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7322                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7323                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7324                 </fields>
7325                 <links>
7326                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7327                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7328                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7329                 </links>
7330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7331                         <actions>
7332                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7333                                         <context link="formula" field="owner"/>
7334                                 </create>
7335                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7336                                         <context link="formula" field="owner"/>
7337                                 </retrieve>
7338                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7339                                         <context link="formula" field="owner"/>
7340                                 </update>
7341                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7342                                         <context link="formula" field="owner"/>
7343                                 </delete>
7344                         </actions>
7345                 </permacrud>
7346         </class>
7347
7348         <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">
7349                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7350                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7351                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7352                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7353                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7354                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7355                 </fields>
7356                 <links>
7357                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7358                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7359                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7360                 </links>
7361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7362                         <actions>
7363                                 <create permission="CREATE_PURCHASE_ORDER">
7364                                         <context link="formula" field="owner"/>
7365                 </create>
7366                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7367                                         <context link="formula" field="owner"/>
7368                 </retrieve>
7369                                 <update permission="CREATE_PURCHASE_ORDER">
7370                                         <context link="formula" field="owner"/>
7371                 </update>
7372                                 <delete permission="CREATE_PURCHASE_ORDER">
7373                                         <context link="formula" field="owner"/>
7374                 </delete>
7375                         </actions>
7376                 </permacrud>
7377         </class>
7378
7379         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7380                 <fields oils_persist:primary="id">
7381                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7382                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7383                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7384                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7385                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7386                 </fields>
7387                 <links>
7388                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7389                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7390                 </links>
7391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7392                 </permacrud>
7393         </class>
7394
7395         <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">
7396                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7397                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7398                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7399                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7400                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7401                 </fields>
7402                 <links>
7403                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7404                 </links>
7405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7406                         <actions>
7407                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7408                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7409                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7410                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7411                         </actions>
7412                 </permacrud>
7413         </class>
7414
7415         <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">
7416                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7417                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7418                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7419                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7420                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7421                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7422                 </fields>
7423                 <links>
7424                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7425                 </links>
7426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7427                         <actions>
7428                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7429                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7430                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7431                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7432                         </actions>
7433                 </permacrud>
7434         </class>
7435
7436         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7437                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7438                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7439                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7440                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7441                 </fields>
7442                 <links>
7443                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7444                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7445                 </links>
7446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7447                 </permacrud>
7448         </class>
7449
7450         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7451                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7452                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7453                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7454                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7455                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7456                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7457                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7458                 </fields>
7459                 <links>
7460                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7461                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7462                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7463                 </links>
7464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7465                 </permacrud>
7466         </class>
7467
7468         <class id="acqscl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7469                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7470                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7471                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7472                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7473                 </fields>
7474                 <links>
7475                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7476                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7477                 </links>
7478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7479                 </permacrud>
7480         </class>
7481
7482         <class id="acqscle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7483                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7484                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7485                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7486                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7487                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7488                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7489                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7490                 </fields>
7491                 <links>
7492                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7493                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7494                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7495                 </links>
7496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7497                 </permacrud>
7498         </class>
7499
7500         <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">
7501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7502                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7503                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7504                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7505                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7506                 </fields>
7507                 <links>
7508                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7509                 </links>
7510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7511             <actions>
7512                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7513                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7514                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7515                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7516             </actions>
7517                 </permacrud>
7518         </class>
7519
7520         <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">
7521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7522                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7523                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7524                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7525                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7526                 </fields>
7527                 <links>
7528                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7529                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7530                 </links>
7531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7532                         <actions>
7533                                 <create permission="ADMIN_CLAIM_POLICY">
7534                                         <context link="claim_policy" field="org_unit"/>
7535                 </create>
7536                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7537                                         <context link="claim_policy" field="org_unit"/>
7538                 </retrieve>
7539                                 <update permission="ADMIN_CLAIM_POLICY">
7540                                         <context link="claim_policy" field="org_unit"/>
7541                 </update>
7542                                 <delete permission="ADMIN_CLAIM_POLICY">
7543                                         <context link="claim_policy" field="org_unit"/>
7544                 </delete>
7545                         </actions>
7546                 </permacrud>
7547         </class>
7548
7549     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7550         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7551             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7552             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7553             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7554             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7555             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7556             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7557             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7558             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7559             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7560             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7561             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7562             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7563             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7564             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7565             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7566         </fields>
7567     </class>
7568
7569     <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">
7570         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7571             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7572             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7573             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7574             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7575             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7576         </fields>
7577     </class>
7578
7579     <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">
7580         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7581             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7582             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7583             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7584             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7585             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7586             <field reporter:label="City" name="city" reporter:datatype="text"/>
7587             <field reporter:label="State" name="state" reporter:datatype="text"/>
7588             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7589             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7590             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7591         </fields>
7592     </class>
7593
7594     <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">
7595         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7596             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7597             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7598             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7599             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7600             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7601             <field reporter:label="City" name="city" reporter:datatype="text"/>
7602             <field reporter:label="State" name="state" reporter:datatype="text"/>
7603             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7604             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7605             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7606         </fields>
7607     </class>
7608
7609     <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">
7610         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7611             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7612             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7613             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7614             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7615             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7616             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7617         </fields>
7618     </class>
7619
7620         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7621                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7622                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7623                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7624                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7625                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7626                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7627                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7628                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7629                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7630                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7631                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7632                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7633                 </fields>
7634                 <links>
7635                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7636                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7637                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7638                 </links>
7639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7640                 </permacrud>
7641         </class>
7642
7643         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
7644                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7645                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7646                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7647                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7648                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7649                 </fields>
7650                 <links>
7651                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7652                 </links>
7653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7654                 </permacrud>
7655         </class>
7656
7657     <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">
7658         <fields>
7659             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7660             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7661             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7662         </fields>
7663                 <links>
7664                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7665                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7666                 </links>
7667     </class>
7668
7669     <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">
7670         <fields>
7671             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7672             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7673         </fields>
7674                 <links>
7675                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7676                 </links>
7677     </class>
7678
7679     <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">
7680         <fields>
7681             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7682             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7683             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7684         </fields>
7685                 <links>
7686                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7687                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7688                 </links>
7689     </class>
7690
7691     <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">
7692         <fields>
7693             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7694             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7695         </fields>
7696                 <links>
7697                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7698                 </links>
7699     </class>
7700
7701     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7702                 <oils_persist:source_definition>
7703
7704             SELECT  DISTINCT l.*
7705               FROM  action.unfulfilled_hold_loops l
7706                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7707               WHERE l.count = m.max
7708
7709                 </oils_persist:source_definition>
7710         <fields>
7711             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7712             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7713             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7714         </fields>
7715                 <links>
7716                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7717                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7718                 </links>
7719     </class>
7720
7721         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
7722                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7723                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7724                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7725                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7726                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7727                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7728                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7729                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7730                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7731                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7732                 </fields>
7733                 <links>
7734                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7735                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7736                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7737                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7738                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7739                 </links>
7740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7741                 </permacrud>
7742         </class>
7743
7744         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
7745                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7746                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7747                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7748                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7749                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7750                 </fields>
7751                 <links>
7752                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7753                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7754                 </links>
7755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7756                 </permacrud>
7757         </class>
7758
7759         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7760                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7761                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7762                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7763                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7764                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7765                 </fields>
7766                 <links>
7767                 </links>
7768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7769                 </permacrud>
7770         </class>
7771
7772         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7773                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7774                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7775                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7776                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7777                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7778                 </fields>
7779                 <links>
7780                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7781                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7782                 </links>
7783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7784                 </permacrud>
7785         </class>
7786         
7787         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7789                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7790                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7791                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7792                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7793                 </fields>
7794                 <links>
7795                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7796                 </links>
7797                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7798                 </permacrud>
7799         </class>
7800         
7801         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
7802                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7803                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7804                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7805                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7806                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7807                 </fields>
7808                 <links>
7809                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7810                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7811                 </links>
7812                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7813                 </permacrud>
7814         </class>
7815
7816         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
7817                 <fields oils_persist:primary="name">
7818                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7819                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7820                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7821                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7822                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7823                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7824                 </fields>
7825                 <links>
7826                 </links>
7827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7828                 </permacrud>
7829         </class>
7830
7831         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7832                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7833                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7834                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7835                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7836                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7837                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7838                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7839                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7840                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7841                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7842                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7843                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7844                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7845                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7846                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7847                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7848                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7849                 </fields>
7850                 <links>
7851                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7852                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7853                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7854                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7855                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7856                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7857                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7858                 </links>
7859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7860                 </permacrud>
7861         </class>
7862
7863         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
7864                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7865                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7866                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7867                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7868                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7869                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7870                 </fields>
7871                 <links>
7872                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7873                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7874                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7875                 </links>
7876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7877                 </permacrud>
7878         </class>
7879
7880         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
7881                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7882                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7883                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7884                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7885                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7886                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7887                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7888                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7889                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7890                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7891                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7892                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7893                 </fields>
7894                 <links>
7895                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7896                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7897                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7898                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7899                 </links>
7900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7901                 </permacrud>
7902         </class>
7903
7904         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
7905                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7906                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7907                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7909                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7910                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7911                 </fields>
7912                 <links>
7913                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7914                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7915                 </links>
7916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7917                 </permacrud>
7918         </class>
7919
7920         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
7921                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7922                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7923                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7924                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7925                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7926                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7927                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7928                 </fields>
7929                 <links>
7930                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7931                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7932                 </links>
7933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7934                 </permacrud>
7935         </class>
7936
7937         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
7938                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7939                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7940                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7941                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7942                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7943                 </fields>
7944                 <links>
7945                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7946                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7947                 </links>
7948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7949                 </permacrud>
7950         </class>
7951
7952         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
7953                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7954                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7955                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7956                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7957                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7958                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7959                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7960                 </fields>
7961                 <links>
7962                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7963                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7964                 </links>
7965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7966                 </permacrud>
7967         </class>
7968
7969         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
7970                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7971                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7972                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7973                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7974                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7975                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7976                 </fields>
7977                 <links>
7978                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7979                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7980                 </links>
7981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7982                 </permacrud>
7983         </class>
7984
7985         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
7986                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7987                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7988                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7989                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7990                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7991                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7992                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7993                 </fields>
7994                 <links>
7995                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7996                 </links>
7997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7998                 </permacrud>
7999         </class>
8000
8001         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8002                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8003                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8004                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8005                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8006                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8007                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8008                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8009                 </fields>
8010                 <links>
8011                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8012                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8013                 </links>
8014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8015                 </permacrud>
8016         </class>
8017
8018         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8019                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8020                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8021                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8022                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8023                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8024                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8025                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8026                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8027                 </fields>
8028                 <links>
8029                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8030                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8031                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8032                 </links>
8033                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8034                 </permacrud>
8035         </class>
8036
8037         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8038                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8039                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8040                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8041                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8042                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8043                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8044                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8045                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8046                 </fields>
8047                 <links>
8048                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8049                 </links>
8050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8051                 </permacrud>
8052         </class>
8053
8054         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8055                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8056                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8057                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8058                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8059                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8060                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8061                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8062                 </fields>
8063                 <links>
8064                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8065                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8066                 </links>
8067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8068                 </permacrud>
8069         </class>
8070
8071         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8072                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8073                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8074                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8075                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8076                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8077                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8078                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8079                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8080                 </fields>
8081                 <links>
8082                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8083                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8084                 </links>
8085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8086                 </permacrud>
8087         </class>
8088
8089         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8090                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8091                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8092                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8093                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8094                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8095                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8096                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8097                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8098                 </fields>
8099                 <links>
8100                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8101                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8102                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8103                 </links>
8104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8105                 </permacrud>
8106         </class>
8107
8108         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8109                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8110                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8111                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8112                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8113                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8114                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8115                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8116                 </fields>
8117                 <links>
8118                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8119                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8120                 </links>
8121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8122                 </permacrud>
8123         </class>
8124
8125         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8126                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8127                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8128                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8129                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8130                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8131                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8132                 </fields>
8133                 <links>
8134                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8135                 </links>
8136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8137                 </permacrud>
8138         </class>
8139
8140         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8141                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8142                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8143                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8144                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8145                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8146                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8147                 </fields>
8148                 <links>
8149                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8150                 </links>
8151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8152                 </permacrud>
8153         </class>
8154
8155         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8156                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8157                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8158                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8159                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8160                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8161                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8162                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8163                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8164                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8165                 </fields>
8166                 <links>
8167                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8168                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8169                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8170                 </links>
8171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8172                 </permacrud>
8173         </class>
8174
8175         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8176                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8177                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8178                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8179                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8180                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8181                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8182                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8183                 </fields>
8184                 <links>
8185                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8186                 </links>
8187                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8188                 </permacrud>
8189         </class>
8190
8191         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8192                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8193                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8194                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8195                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8196                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8197                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8198                 </fields>
8199                 <links>
8200                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8201                 </links>
8202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8203                 </permacrud>
8204         </class>
8205
8206         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8207                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8208                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8209                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8210                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8211                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8212                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8213                 </fields>
8214                 <links>
8215                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8216                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8217                 </links>
8218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8219                 </permacrud>
8220         </class>
8221
8222         <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">
8223                 <fields oils_persist:primary="id">
8224                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8225                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8226                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8227                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8228                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8229                 </fields>
8230                 <links>
8231                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8232                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8233                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8234                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8235                 </links>
8236         </class>
8237
8238         <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">
8239                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8240                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8241                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8242                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8243                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8244                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8245                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8246                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8247                 </fields>
8248                 <links/>
8249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8250                         <actions>
8251                                 <retrieve/>
8252                         </actions>
8253                 </permacrud>
8254         </class>
8255
8256         <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">
8257                 <fields oils_persist:primary="ptype_key">
8258                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8259                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8260                 </fields>
8261                 <links/>
8262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8263                         <actions>
8264                                 <retrieve/>
8265                         </actions>
8266                 </permacrud>
8267         </class>
8268
8269         <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">
8270                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8271                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8272                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8273                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8274                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8275                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8276                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8277                 </fields>
8278                 <links>
8279                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8280                 </links>
8281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8282                         <actions>
8283                                 <retrieve/>
8284                         </actions>
8285                 </permacrud>
8286         </class>
8287
8288         <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">
8289                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8290                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8291                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8292                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8293                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8294                 </fields>
8295                 <links>
8296                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8297                 </links>
8298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8299                         <actions>
8300                                 <retrieve/>
8301                         </actions>
8302                 </permacrud>
8303         </class>
8304
8305         <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">
8306                 <fields oils_persist:primary="code">
8307                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8308                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8309                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8310                 </fields>
8311                 <links/>
8312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8313                         <actions>
8314                                 <retrieve/>
8315                         </actions>
8316                 </permacrud>
8317         </class>
8318
8319         <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">
8320                 <oils_persist:source_definition>
8321
8322             SELECT  b.id,
8323                     MAX(dcp.edit_date) AS last_delete_date
8324              FROM   biblio.record_entry b
8325                     JOIN asset.call_number cn ON (cn.record = b.id)
8326                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8327              WHERE  NOT b.deleted
8328              GROUP BY b.id
8329              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8330
8331                 </oils_persist:source_definition>
8332                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8333                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8334                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8335                 </fields>
8336                 <links>
8337                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8338                 </links>
8339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8340                         <actions>
8341                                 <retrieve/>
8342                         </actions>
8343                 </permacrud>
8344         </class>
8345
8346         <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">
8347                 <oils_persist:source_definition>
8348
8349             -- -- 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.
8350             -- -- 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
8351             -- -- may not.
8352             -- SELECT
8353             --     bre.id AS "bib_id",
8354             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8355             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8356             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8357             -- FROM (
8358                 SELECT
8359                     y.bre AS "id",
8360                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8361                     y.hold_count AS "hold_count",
8362                     (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"
8363                 FROM (
8364                         SELECT
8365                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8366                             COUNT(*) AS "hold_count"
8367                         FROM action.hold_request h
8368                         WHERE
8369                             cancel_time IS NULL
8370                             AND fulfillment_time IS NULL
8371                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8372                         GROUP BY 1
8373                     )y LEFT JOIN (
8374                         SELECT 
8375                             (SELECT id
8376                                 FROM biblio.record_entry 
8377                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8378                             ) AS "bre", 
8379                             COUNT(*) AS "copy_count"
8380                         FROM asset.copy
8381                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8382                         WHERE copy.holdable 
8383                             AND NOT copy.deleted 
8384                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8385                         GROUP BY 1
8386                     )x ON x.bre = y.bre
8387                 -- )z RIGHT JOIN (
8388                 --     SELECT id
8389                 --     FROM biblio.record_entry
8390                 --     WHERE NOT deleted
8391                 -- )bre ON (z.bib_id = bre.id)
8392                 
8393
8394                 </oils_persist:source_definition>
8395                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8396                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8397                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8398                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8399                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8400                 </fields>
8401                 <links>
8402                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8403                 </links>
8404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8405                         <actions>
8406                                 <retrieve/>
8407                         </actions>
8408                 </permacrud>
8409         </class>
8410
8411         <!-- ********************************************************************************************************************* -->
8412         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8413         <!-- ********************************************************************************************************************* -->
8414         <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">
8415                 <fields oils_persist:primary="id">
8416                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8417                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8418                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8419                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8420                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8421                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8422                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8423                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8424                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8425                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8426                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8427                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8428                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8429                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8430                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8431                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8432                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8433                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8434                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8435                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8436                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8437                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8438                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8439                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8440                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8441                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8442                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8443                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8444                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8445                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8446                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8447                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8448                 </fields>
8449                 <links>
8450                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8451                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8452                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8453                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8454                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8455                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8456                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8457                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8458                 </links>
8459         </class>
8460
8461         <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">
8462                 <fields oils_persist:primary="id">
8463                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8464                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8465                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8466                 </fields>
8467                 <links>
8468                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8469                 </links>
8470         </class>
8471
8472         <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">
8473                 <fields oils_persist:primary="id">
8474                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8475                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8476                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8477                 </fields>
8478                 <links>
8479                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8480                 </links>
8481         </class>
8482
8483         <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">
8484                 <fields oils_persist:primary="id">
8485                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8486
8487                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8488                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8489                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8490
8491                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8492                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8493                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8494
8495                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8496                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8497
8498                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8499                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8500                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8501
8502                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8503                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8504
8505                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8506                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8507                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8508
8509                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8510                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8511                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8512
8513                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8514                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8515                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8516                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8517
8518                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8519                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8520
8521                 </fields>
8522                 <links>
8523                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8524                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8525                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8526                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8527                 </links>
8528         </class>
8529
8530         <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">
8531                 <oils_persist:source_definition>
8532
8533             SELECT
8534                 po.ordering_agency AS ordering_agency,
8535                 po.id AS purchase_order,
8536                 li.id AS lineitem,
8537                 lid.id AS lineitem_detail,
8538                 cpa.id AS claim_policy_action
8539             FROM
8540                 acq.lineitem_detail lid
8541                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8542                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8543                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8544                 JOIN acq.claim_policy_action cpa ON (
8545                     cpa.claim_policy = cp.id
8546
8547                     -- we only care about claim policy actions whose claim
8548                     -- interval we'd reached or exceeded
8549                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8550
8551                     -- filter out all claim policy actions where claim events
8552                     -- have occurred on or after the action's action_interval
8553                     AND NOT EXISTS (
8554                         SELECT 1
8555                         FROM
8556                             acq.claim_event evt
8557                             JOIN acq.claim claim ON (
8558                                 claim.id = evt.claim
8559                                 AND claim.lineitem_detail = lid.id
8560                             )
8561                         WHERE
8562                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8563                     )
8564                 )
8565             WHERE
8566                 lid.cancel_reason IS NULL
8567                 AND li.cancel_reason IS NULL -- belt/suspenders
8568                 AND po.cancel_reason IS NULL -- belt/suspenders
8569                 AND lid.recv_time IS NULL
8570                 AND po.state = 'on-order'
8571             ORDER BY 1, 2, 3, 4, 5
8572
8573                 </oils_persist:source_definition>
8574                 <fields>
8575                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8576                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8577                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8578                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8579                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8580                 </fields>
8581                 <links>
8582                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8583                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8584                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8585                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8586                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8587                 </links>
8588         </class>
8589
8590         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8591                 <oils_persist:source_definition>
8592
8593             SELECT 
8594                 li.id AS lineitem, 
8595                 (
8596                     SELECT COUNT(lid.id) 
8597                     FROM acq.lineitem_detail lid
8598                     WHERE lineitem = li.id
8599                 ) AS item_count,
8600                 (
8601                     SELECT COUNT(lid.id) 
8602                     FROM acq.lineitem_detail lid
8603                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8604                 ) AS recv_count,
8605                 (
8606                     SELECT COUNT(lid.id) 
8607                     FROM acq.lineitem_detail lid
8608                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8609                 ) AS cancel_count,
8610                 (
8611                     SELECT COUNT(lid.id) 
8612                     FROM acq.lineitem_detail lid
8613                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8614                     WHERE NOT debit.encumbrance AND lineitem = li.id
8615                 ) AS invoice_count,
8616                 (
8617                     SELECT COUNT(DISTINCT(lid.id)) 
8618                     FROM acq.lineitem_detail lid
8619                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8620                     WHERE lineitem = li.id
8621                 ) AS claim_count,
8622                 (
8623                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8624                     FROM acq.lineitem_detail lid
8625                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8626                 ) AS estimated_amount,
8627                 (
8628                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8629                     FROM acq.lineitem_detail lid
8630                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8631                     WHERE debit.encumbrance AND lineitem = li.id
8632                 ) AS encumbrance_amount,
8633                 (
8634                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8635                     FROM acq.lineitem_detail lid
8636                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8637                     WHERE NOT debit.encumbrance AND lineitem = li.id
8638                 ) AS paid_amount
8639
8640                 FROM acq.lineitem AS li
8641         </oils_persist:source_definition>
8642                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8643                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8644                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8645                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8646                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8647                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8648                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8649                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8650                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8651                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8652                 </fields>
8653                 <links>
8654                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8655                 </links>
8656     </class>
8657
8658
8659         <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">
8660                 <oils_persist:source_definition>
8661
8662                         SELECT  t.*
8663                           FROM  action.transit_copy t
8664                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8665                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8666                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8667
8668                 </oils_persist:source_definition>
8669                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8670                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8671                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8672                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8673                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8674                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8675                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8676                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8677                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8678                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8679                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8680                 </fields>
8681                 <links>
8682                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8683                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8684                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8685                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8686                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8687                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8688                 </links>
8689         </class>
8690
8691     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8692                 <oils_persist:source_definition>
8693
8694         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8695                 SELECT
8696                         cp.id as copy,
8697                         COUNT(circ.id),
8698                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8699                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8700                 FROM
8701                         asset.copy cp
8702                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8703                 GROUP BY 1, 3, 4
8704                 UNION
8705                 SELECT
8706                         cp.id as copy,
8707                         COUNT(circ.id),
8708                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8709                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8710                 FROM
8711                         asset.copy cp
8712                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8713                 GROUP BY 1, 3, 4
8714                 UNION
8715                 SELECT
8716                         id as copy,
8717                         circ_count,
8718                         -1 AS year,
8719                         false as is_renewal
8720                 FROM
8721                         extend_reporter.legacy_circ_count
8722         )x GROUP BY 1, 3, 4
8723
8724                 </oils_persist:source_definition>
8725         <fields>
8726             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8727             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8728             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8729             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8730         </fields>
8731                 <links>
8732                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8733                 </links>
8734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8735                         <actions>
8736                                 <retrieve/>
8737                         </actions>
8738                 </permacrud>
8739     </class>
8740
8741         <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">
8742                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8743                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8744                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8745                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8746                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8747                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8748                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8749                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8750                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8751                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8752                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8753                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8754                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8755                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8756                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8757                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8758                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8759                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8760                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8761                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8762                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8763                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8764                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8765                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8766                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8767                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8768                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8769                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8770                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8771                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8772                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8773                 </fields>
8774                 <links>
8775                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8776                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8777                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8778                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8779                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8780                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8781                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8782                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8783                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8784                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8785                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8786                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8787                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8788                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8789                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8790                 </links>
8791         </class>
8792
8793     <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">
8794         <fields oils_persist:primary="id">
8795             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8796             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8797             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8798             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8799             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8800             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8801             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8802             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8803             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8804             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8805             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8806             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8807             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8808             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8809             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8810             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8811             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8812             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8813             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8814             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8815             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8816             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8817             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8818             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8819             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8820             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8821             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8822             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8823             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8824             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8825             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8826             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8827             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8828             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8829         </fields>
8830         <links>
8831             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8832             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8833             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8834             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8835             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8836         </links>
8837     </class>
8838
8839     <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">
8840         <fields oils_persist:primary="id">
8841             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8842             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8843             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8844             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8845         </fields>
8846         <links>
8847             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8848             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8849         </links>
8850     </class>
8851
8852     <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">
8853         <fields oils_persist:primary="owning_lib">
8854             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8855             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8856             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8857         </fields>
8858         <links>
8859             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8860         </links>
8861     </class>
8862
8863     <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">
8864         <fields oils_persist:primary="id">
8865             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8866             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8867             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8868             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8869             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8870         </fields>
8871         <links>
8872             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8873             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8874             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8875         </links>
8876     </class>
8877
8878     <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">
8879         <fields oils_persist:primary="circ_lib">
8880             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8881             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8882             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8883             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8884         </fields>
8885         <links>
8886             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8887             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8888         </links>
8889     </class>
8890
8891     <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">
8892         <fields oils_persist:primary="id">
8893             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8894             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8895             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8896             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8897             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8898         </fields>
8899         <links>
8900             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8901             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8902             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8903         </links>
8904     </class>
8905
8906     <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">
8907         <fields oils_persist:primary="home_ou">
8908             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8909             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8910             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8911             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8912         </fields>
8913         <links>
8914             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8915             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8916         </links>
8917     </class>
8918         <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">
8919                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8920                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8921                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8922                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8923                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8924                 </fields>
8925                 <links>
8926                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8927                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8928                 </links>
8929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8930                         <actions>
8931                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8932                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8933                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8934                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8935                         </actions>
8936                 </permacrud>
8937         </class>
8938         <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">
8939                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8940                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8941                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8942                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8943                 </fields>
8944                 <links>
8945                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8946                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8947                         </links>
8948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8949                 <actions>
8950                                 <create permission="ADMIN_ACQ_FUND_TAG">
8951                                         <context link="tag" field="owner"/>
8952                                 </create>
8953                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8954                                         <context link="tag" field="owner"/>
8955                                 </retrieve>
8956                                 <update permission="ADMIN_ACQ_FUND_TAG">
8957                                         <context link="tag" field="owner"/>
8958                                 </update>
8959                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8960                                         <context link="tag" field="owner"/>
8961                                 </delete>
8962                         </actions>
8963                 </permacrud>
8964         </class>
8965         <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">
8966                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
8967                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8968                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
8969                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
8970                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
8971                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
8972                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8973                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
8974                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
8975                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
8976                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
8977                 </fields>
8978                 <links>
8979                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8980                 </links>
8981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8982                         <actions>
8983                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8984                                 <retrieve/>
8985                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8986                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8987                         </actions>
8988                 </permacrud>
8989         </class>
8990
8991         <!-- ********************************************************************************************************************* -->
8992
8993 </IDL>
8994
8995 <!--
8996     vim:noet:ts=4:sw=4:
8997 -->