]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
b8fe012cda1cba0ea63a96e49d618ad6f7e223d0
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
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                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131
132         <!-- Actually in the DB -->
133         <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">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
138                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
139                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
140                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
141                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
142                 </fields>
143                 <links>
144                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
145                 </links>
146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
147                         <actions>
148                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
149                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
150                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
151                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
152                         </actions>
153                 </permacrud>
154         </class>
155
156         <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">
157                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
158                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
159                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
160                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
164                 </links>
165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
166                         <actions>
167                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
168                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
169                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
170                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
171                         </actions>
172                 </permacrud>
173         </class>
174
175         <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">
176                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
177                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
178                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
179                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
180                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
181                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
182                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
183                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
184                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
185                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
186                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
187                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
188                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
189                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
190                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
191                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
192                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
193                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
194                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
195                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
196                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
197                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
198                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
199                 </fields>
200                 <links>
201                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
202                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
203                 </links>
204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
205                         <actions>
206                                 <create permission="CREATE_IMPORT_ITEM">
207                     <context link="definition" field="owner"/>
208                                 </create>
209                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
210                     <context link="definition" field="owner"/>
211                                 </retrieve>
212                                 <update permission="UPDATE_IMPORT_ITEM">
213                     <context link="definition" field="owner"/>
214                                 </update>
215                                 <delete permission="DELETE_IMPORT_ITEM">
216                     <context link="definition" field="owner"/>
217                                 </delete>
218                         </actions>
219                 </permacrud>
220         </class>
221
222         <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">
223                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
224                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
225                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
226                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
227                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
228                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
229                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
230                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
231                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
232                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
233                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
234                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
235                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
236                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
237                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
238                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
239                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
240                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
241                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
242                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
243                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
244                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
245                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
246                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
248                 </fields>
249                 <links>
250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
255                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
256                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
257                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <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">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
264                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
265                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
266                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
267                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
268                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
269                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
270                 </fields>
271                 <links>
272                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
273                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
274                 </links>
275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
276                         <actions>
277                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
278                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
279                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
280                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
281                         </actions>
282                 </permacrud>
283         </class>
284
285         <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">
286                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
287                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
288                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
289                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
290                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
291                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
292                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
293                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
294                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
295                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
296                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
297                 </fields>
298                 <links>
299                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
300                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
302             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
303             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
308                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
309                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <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">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
319                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
320                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
321                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
322                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
323                 </fields>
324                 <links/>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
328                 <retrieve/>
329                 <!--
330                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
331                 -->
332                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
333                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
334                         </actions>
335                 </permacrud>
336         </class>
337
338         <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">
339                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
340                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
341                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
342                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
343                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
344                 </fields>
345                 <links>
346                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
347                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
348                 </links>
349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
350                         <actions>
351                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
352                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
353                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
354                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
355                         </actions>
356                 </permacrud>
357         </class>
358
359         <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">
360                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
361                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
362                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
363                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
364                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
365                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
366                 </fields>
367                 <links>
368                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
369                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
370                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
371                 </links>
372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
373                         <actions>
374                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
375                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
376                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
377                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
378                         </actions>
379                 </permacrud>
380         </class>
381
382         <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">
383                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
384                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
385                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
386                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
387                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
388                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
389                 </fields>
390                 <links>
391                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
392                 </links>
393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
394                         <actions>
395                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
396                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
397                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
398                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
399                         </actions>
400                 </permacrud>
401         </class>
402
403         <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">
404                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
405                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
406                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
407                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
408                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
409                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
410                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
411                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
412                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
413                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
414                 </fields>
415                 <links>
416                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
417                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
418             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
419             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
420                 </links>
421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
422                         <actions>
423                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
424                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
425                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
426                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
427                         </actions>
428                 </permacrud>
429         </class>
430
431         <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">
432                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
433                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
434                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
435                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
436                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
437                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
438                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
439                 </fields>
440                 <links/>
441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
442                         <actions>
443                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
444                 <retrieve/>
445                 <!--
446                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
447                 -->
448                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
449                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
450                         </actions>
451                 </permacrud>
452         </class>
453
454         <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">
455                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
456                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
457                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
458                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
459                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
460                 </fields>
461                 <links>
462                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
463                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
464                 </links>
465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
466                         <actions>
467                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                         </actions>
472                 </permacrud>
473         </class>
474
475         <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">
476                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
477                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
478                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
479                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
480                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
481                 </fields>
482                 <links>
483                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
484                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
485                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
486                 </links>
487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
488                         <actions>
489                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
490                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
491                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
492                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
493                         </actions>
494                 </permacrud>
495         </class>
496
497
498         <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">
499                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
500                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
501                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
502                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
503                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
504                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
505                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
506                 </fields>
507                 <links>
508                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
509                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
510                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
511                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
512                 </links>
513         </class>
514
515     <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">
516         <fields oils_persist:primary="id">
517             <field reporter:label="ID" name="id" reporter:datatype="id"/>
518             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
519             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
520             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
521             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
522         </fields>
523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
524             <actions>
525                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
526                 <retrieve/>
527                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
528                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
529             </actions>
530         </permacrud>
531     </class>
532
533         <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">
534                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
536                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
537                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
538                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
539                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
540                 </fields>
541                 <links>
542                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
543                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
544                 </links>
545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
546             <actions>
547                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
548                 <retrieve/>
549                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
550                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
551             </actions>
552         </permacrud>
553         </class>
554
555         <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">
556                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
557                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
558                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
559                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
560                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
561                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
562                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
563                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
564                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
565                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
566                 </fields>
567                 <links>
568                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
569                 </links>
570         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571             <actions>
572                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
573                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
574                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
575                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
576             </actions>
577         </permacrud>
578         </class>
579
580     <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">
581         <fields oils_persist:primary="name">
582             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
583             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
584             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
585             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
586             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
587             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
588             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
589             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
590             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
591         </fields>
592         <links>
593             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
594         </links>
595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596             <actions>
597                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
598                 <retrieve/>
599                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
600                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
601             </actions>
602         </permacrud>
603     </class>
604
605     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
606         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
607             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
608             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
609             <field reporter:label="Name" name="name" reporter:datatype="text"/>
610             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
611             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
612             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
613             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
614         </fields>
615         <links>
616             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
617         </links>
618     </class>
619
620         <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">
621                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
622                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
623                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
624                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
625                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
626                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
627                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
628                 </fields>
629                 <links>
630             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
631             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
632                 </links>
633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
634                         <actions>
635                                 <retrieve/>
636                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
637                         </actions>
638                 </permacrud>
639         </class>
640
641         <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">
642                 <fields oils_persist:primary="key">
643                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
644                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
645                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
646                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
647                 </fields>
648                 <links/>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
652                                 <retrieve/>
653                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
654                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
660                 <fields oils_persist:primary="module">
661                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
662                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
663                 </fields>
664                 <links/>
665         </class>
666
667         <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">
668                 <fields oils_persist:primary="module">
669                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
670                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
671                 </fields>
672                 <links/>
673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
674                         <actions>
675                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
676                                 <retrieve/>
677                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
678                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
679                         </actions>
680                 </permacrud>
681         </class>
682
683         <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">
684                 <fields oils_persist:primary="module">
685                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
686                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
687                 </fields>
688                 <links/>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
692                                 <retrieve/>
693                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
694                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="module">
701                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
702                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
703                 </fields>
704                 <links/>
705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
706                         <actions>
707                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
708                                 <retrieve/>
709                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
710                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
711                         </actions>
712                 </permacrud>
713         </class>
714
715         <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">
716                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
717                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
718                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
719                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
720                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
721                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
722                 </fields>
723                 <links>
724                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
725                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
726                 </links>
727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
728                         <actions>
729                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
730                     <context link="event_def" field="owner"/>
731                 </create>
732                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
733                     <context link="event_def" field="owner"/>
734                 </retrieve>
735                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
736                     <context link="event_def" field="owner"/>
737                 </update>
738                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
739                     <context link="event_def" field="owner"/>
740                 </delete>
741                         </actions>
742                 </permacrud>
743         </class>
744
745         <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">
746                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
747                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
748                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
749                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
750                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
751                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
752                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
753                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
754                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
755                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
756                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
757                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
758                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
759                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
760                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
761                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
762                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
763                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
764                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
765                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
766                 </fields>
767                 <links>
768                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
769                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
770                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
771                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
772                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
773                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
774                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
775                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
776                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
777                 </links>
778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
779                         <actions>
780                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
781                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
782                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
783                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
784                         </actions>
785                 </permacrud>
786         </class>
787
788         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
789                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
790                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
791                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
792                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
793                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
794                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
795                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
796                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
797                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
798                         <field reporter:label="State" name="state" reporter:datatype="text"/>
799                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
800                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
801                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
802                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
803                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
804                 </fields>
805                 <links>
806                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
807                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
808                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
809                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
810                 </links>
811         </class>
812
813         <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">
814                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
815                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
817                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
818                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
819                 </fields>
820                 <links>
821                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
822                 </links>
823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824                         <actions>
825                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
826                     <context link="event_def" field="owner"/>
827                 </create>
828                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
829                     <context link="event_def" field="owner"/>
830                 </retrieve>
831                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
832                     <context link="event_def" field="owner"/>
833                 </update>
834                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
835                     <context link="event_def" field="owner"/>
836                 </delete>
837                         </actions>
838                 </permacrud>
839         </class>
840
841         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
843                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
844                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
845                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
846                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
847                 </fields>
848                 <links>
849                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
850                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
851                 </links>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="code">
856                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
857                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
858                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
859                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
860                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
861                 </fields>
862                 <links/>
863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
864             <actions>
865                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
866                 <retrieve/>
867                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
868                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
869             </actions>
870         </permacrud>
871         </class>
872
873         <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">
874                 <fields oils_persist:primary="code">
875                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
876                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
877                 </fields>
878                 <links/>
879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
880             <actions>
881                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
882                 <retrieve/>
883                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
884                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
885             </actions>
886         </permacrud>
887         </class>
888
889         <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">
890                 <fields oils_persist:primary="code">
891                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
892                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
893                 </fields>
894                 <links/>
895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
896             <actions>
897                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
898                 <retrieve/>
899                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
900                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
901             </actions>
902         </permacrud>
903         </class>
904
905         <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">
906                 <fields oils_persist:primary="code">
907                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
908                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
909                 </fields>
910                 <links/>
911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
912             <actions>
913                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
914                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
915                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
916                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
917             </actions>
918         </permacrud>
919         </class>
920
921         <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">
922                 <fields oils_persist:primary="code">
923                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
924                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
925                 </fields>
926                 <links/>
927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
928             <actions>
929                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
930                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
931                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
932                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
933             </actions>
934         </permacrud>
935         </class>
936
937         <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">
938                 <fields oils_persist:primary="code">
939                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
940                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
941                 </fields>
942                 <links/>
943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
944             <actions>
945                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
946                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
947                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
948                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
949             </actions>
950         </permacrud>
951         </class>
952
953         <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">
954                 <fields oils_persist:primary="code">
955                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
956                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
957                 </fields>
958                 <links/>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
962                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
963                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
964                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <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">
970                 <fields oils_persist:primary="code">
971                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
972                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
973                 </fields>
974                 <links/>
975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
976             <actions>
977                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
978                 <retrieve/>
979                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
980                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
981             </actions>
982         </permacrud>
983         </class>
984
985         <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">
986                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
987                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
988                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
989                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
990                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
991                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
992                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
993                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
994                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
995                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
996                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
997                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
998                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
999                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1000                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1001                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1002                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1003                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1004                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1005                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1006                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1007                 </fields>
1008                 <links>
1009                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1010                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1011                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1012                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1013                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1014                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1015                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1016                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1017                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1018                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1019                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1020                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1021             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1022                 </links>
1023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1024             <actions>
1025                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1026                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1027                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1028                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1029             </actions>
1030         </permacrud>
1031         </class>
1032
1033         <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">
1034                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1035                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1036                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1037                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1038                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1039                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1040                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1041                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1042                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1043                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1044                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1045                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1046                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1047                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1048                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1049                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1050                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1051                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1052                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1053                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1054                 </fields>
1055                 <links>
1056                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1057                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1058                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1059                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1060                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1061                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1062                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1063                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1064                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1065                 </links>
1066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1067             <actions>
1068                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1069                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1071                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1072             </actions>
1073         </permacrud>
1074         </class>
1075
1076         <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">
1077                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1078                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1079                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1080                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1081                 </fields>
1082                 <links>
1083                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1084                 </links>
1085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1086             <actions>
1087                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1088                     <context link="matchpoint" field="org_unit"/>
1089                 </create>
1090                 <retrieve/>
1091                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1092                     <context link="matchpoint" field="org_unit"/>
1093                 </update>
1094                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1095                     <context link="matchpoint" field="org_unit"/>
1096                 </delete>
1097             </actions>
1098         </permacrud>
1099         </class>
1100
1101         <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">
1102                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1103                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1104                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1105                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1106                 </fields>
1107                 <links>
1108                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1109                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1110                 </links>
1111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1112             <actions>
1113                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1114                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1115                 </create>
1116                 <retrieve/>
1117                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1118                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1119                 </update>
1120                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1121                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1122                 </delete>
1123             </actions>
1124         </permacrud>
1125         </class>
1126
1127         <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">
1128                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1129                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1130                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1131                 </fields>
1132                 <links/>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1136                 <retrieve/>
1137                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1138                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1139             </actions>
1140         </permacrud>
1141         </class>
1142
1143         <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">
1144                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1145                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1146                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1147                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1148                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1149                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1150                 </fields>
1151                 <links>
1152                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1153                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1154                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1155                 </links>
1156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157             <actions>
1158                 <create permission="ADMIN_SURVEY">
1159                     <context link="survey" field="owner"/>
1160                 </create>
1161                 <retrieve/>
1162                 <update permission="ADMIN_SURVEY">
1163                     <context link="survey" field="owner"/>
1164                 </update>
1165                 <delete permission="ADMIN_SURVEY">
1166                     <context link="survey" field="owner"/>
1167                 </delete>
1168             </actions>
1169         </permacrud>
1170         </class>
1171         <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">
1172                 <fields oils_persist:primary="id" oils_persist:sequence="">
1173                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1174                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1175                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1176                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1177                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1178                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1179                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1180                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1181                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1182                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1183                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1184                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1185                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1186                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1187                 </fields>
1188                 <links>
1189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1190                 </links>
1191         </class>
1192         <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">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="">
1194                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1195                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1196                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1197                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1198                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1199                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1200                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1201                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1202                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1203                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1204                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1205                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1206                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1207                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1208                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1209                 </fields>
1210                 <links>
1211                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1212                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         </class>
1215         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1216                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1217                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1218                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1219                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1220                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1221                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1222                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1223                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1224                 </fields>
1225                 <links>
1226                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1227                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1228                 </links>
1229         </class>
1230         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1231                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1232                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1233                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1234                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1235                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1236                 </fields>
1237                 <links>
1238                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1240                 </links>
1241         </class>
1242         <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">
1243                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1244                         <field name="field" reporter:datatype="link"/>
1245                         <field name="id" reporter:datatype="id" />
1246                         <field name="source" reporter:datatype="link"/>
1247                         <field name="value" reporter:datatype="text"/>
1248                 </fields>
1249                 <links>
1250                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1251                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1252                 </links>
1253         </class>
1254         <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">
1255                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1256                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1257                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1258                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1259                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1260                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1261                 </fields>
1262                 <links>
1263                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1264                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1265                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1266                 </links>
1267         </class>
1268         <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">
1269                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1270                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1271                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1272                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1273                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1274                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1275                 </fields>
1276                 <links>
1277                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1278                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1279                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1280                 </links>
1281         </class>
1282         <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">
1283                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1284                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1285                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1286                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1287                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1288                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1289                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1290                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1291                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1292                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1293                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1294                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1295                 </fields>
1296                 <links>
1297                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1298                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1299                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1300                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1301                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1302                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1303                 </links>
1304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1305             <actions>
1306                 <create permission="TRANSIT_COPY" context_field="owner">
1307                     <context link="target_copy" field="circ_lib"/>
1308                 </create>
1309                 <retrieve/>
1310                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1311                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1312             </actions>
1313         </permacrud>
1314         </class>
1315         <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">
1316                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1317                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1318                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1319                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1320                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1321                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1322                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1323                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1324                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1325                 </fields>
1326                 <links>
1327                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1328                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1329                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1330                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1331                 </links>
1332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1333             <actions>
1334                 <create permission="ADMIN_SURVEY">
1335                     <context link="survey" field="owner"/>
1336                 </create>
1337                 <retrieve/>
1338                 <update permission="ADMIN_SURVEY">
1339                     <context link="survey" field="owner"/>
1340                 </update>
1341                 <delete permission="ADMIN_SURVEY">
1342                     <context link="survey" field="owner"/>
1343                 </delete>
1344             </actions>
1345         </permacrud>
1346         </class>
1347         <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">
1348                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1349                         <field name="bucket" />
1350                         <field name="id" reporter:datatype="id" />
1351                         <field name="target_copy" reporter:datatype="link"/>
1352                         <field name="create_time" reporter:datatype="timestamp" />
1353                         <field name="pos" reporter:datatype="int" />
1354                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1355                 </fields>
1356                 <links>
1357                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1358                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1359             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1360                 </links>
1361         </class>
1362         <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">
1363                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1364                         <field name="id" reporter:datatype="id" />
1365                         <field name="item" reporter:datatype="link"/>
1366                         <field name="note" reporter:datatype="text" />
1367                 </fields>
1368                 <links>
1369                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1370                 </links>
1371         </class>
1372         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1373                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1374                         <field name="active" reporter:datatype="bool"/>
1375                         <field name="arn_source" />
1376                         <field name="arn_value" />
1377                         <field name="create_date" reporter:datatype="timestamp"/>
1378                         <field name="creator" />
1379                         <field name="deleted" reporter:datatype="bool"/>
1380                         <field name="edit_date" reporter:datatype="timestamp"/>
1381                         <field name="editor" />
1382                         <field name="id" reporter:datatype="id" />
1383                         <field name="last_xact_id" />
1384                         <field name="marc" />
1385                         <field name="source" />
1386                         <field name="fixed_fields" oils_persist:virtual="true" />
1387                         <field name="notes" oils_persist:virtual="true" />
1388                 </fields>
1389                 <links>
1390                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1391                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1392                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1393                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1394                 </links>
1395         </class>
1396         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1397                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1398                         <field name="char_encoding" />
1399                         <field name="id" />
1400                         <field name="record" />
1401                         <field name="record_status" />
1402                 </fields>
1403                 <links>
1404                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1405                 </links>
1406         </class>
1407         <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">
1408                 <fields oils_persist:primary="code" oils_persist:sequence="">
1409                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1410                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1411                 </fields>
1412                 <links/>
1413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1414             <actions>
1415                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1416                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1417                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1418                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1419             </actions>
1420         </permacrud>
1421         </class>
1422         <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">
1423                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1424                         <field name="accepting_usr" />
1425                         <field name="amount" reporter:datatype="money" />
1426                         <field name="amount_collected" reporter:datatype="money" />
1427                         <field name="approval_code" reporter:datatype="text"/>
1428                         <field name="cash_drawer" reporter:datatype="link"/>
1429                         <field name="cc_number" reporter:datatype="text"/>
1430                         <field name="cc_type" reporter:datatype="text"/>
1431                         <field name="cc_processor" reporter:datatype="text"/>
1432                         <field name="expire_month" reporter:datatype="int" />
1433                         <field name="expire_year" reporter:datatype="int" />
1434                         <field name="id" reporter:datatype="id" />
1435                         <field name="note" reporter:datatype="text"/>
1436                         <field name="payment_ts" reporter:datatype="timestamp"/>
1437                         <field name="xact" reporter:datatype="link"/>
1438                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1439                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1440                 </fields>
1441                 <links>
1442                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1443                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1444                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1445                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1446                 </links>
1447         </class>
1448         <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">
1449                 <fields oils_persist:primary="name">
1450                         <field reporter:label="Field Class" name="field_class" />
1451                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1452                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1453                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1454                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1455                 </fields>
1456                 <links/>
1457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1458             <actions>
1459                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1460                 <retrieve/>
1461                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1462                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1463             </actions>
1464         </permacrud>
1465         </class>
1466
1467         <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">
1468                 <fields oils_persist:primary="alias">
1469                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1470                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1471                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1472                 </fields>
1473                 <links>
1474                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1475                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1476                 </links>
1477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1478             <actions>
1479                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1480                 <retrieve/>
1481                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1482                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1483             </actions>
1484         </permacrud>
1485         </class>
1486
1487         <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">
1488                 <fields oils_persist:primary="name">
1489                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1490                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1491                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1492                 </fields>
1493                 <links>
1494                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1495                 </links>
1496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1497             <actions>
1498                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1499                 <retrieve/>
1500                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1501                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1502             </actions>
1503         </permacrud>
1504         </class>
1505
1506         <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">
1507                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1508                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1509                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1510                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1511                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1512                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1513                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1514                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1515                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1516                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1517                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1518                 </fields>
1519                 <links>
1520                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1521                 </links>
1522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1523             <actions>
1524                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1525                 <retrieve/>
1526                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1527                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1528             </actions>
1529         </permacrud>
1530         </class>
1531         <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">
1532                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1533                         <field name="id" reporter:datatype="id" />
1534                         <field name="name" reporter:datatype="text"/>
1535                         <field name="xpath" reporter:datatype="text"/>
1536                         <field name="format" reporter:datatype="link"/>
1537                         <field name="first_word" reporter:datatype="bool" />
1538                 </fields>
1539                 <links/>
1540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1541             <actions>
1542                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1543                 <retrieve/>
1544                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1545                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1546             </actions>
1547         </permacrud>
1548         </class>
1549         <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">
1550                 <fields oils_persist:primary="code" oils_persist:sequence="">
1551                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1552                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1553                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1554                 </fields>
1555                 <links/>
1556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557             <actions>
1558                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1559                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1560                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1561                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1562             </actions>
1563         </permacrud>
1564         </class>
1565         <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">
1566                 <fields oils_persist:primary="code" oils_persist:sequence="">
1567                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1568                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1569                 </fields>
1570                 <links/>
1571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1572             <actions>
1573                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1574                 <retrieve/>
1575                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1576                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1577             </actions>
1578         </permacrud>
1579         </class>
1580         <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">
1581                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1582                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1583                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1584                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1585                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1586                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1587                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1588                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1589                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1590                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1591                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1592                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1593                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1594                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1595                 </fields>
1596                 <links>
1597                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1598                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1599                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1600                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1601                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1602                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1603                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1604                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1605                 </links>
1606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1607             <actions>
1608                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1609                 <retrieve/>
1610                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1611                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1612             </actions>
1613         </permacrud>
1614         </class>
1615         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1616                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1617                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1618                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1619                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1620                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1621                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1622                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1623                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1624                 </fields>
1625                 <links>
1626                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1627                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1628         </links>
1629         </class>
1630         <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">
1631                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1632                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1633                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1634                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1635                 </fields>
1636                 <links>
1637                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1638                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1639                 </links>
1640         </class>
1641         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1642                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1643                         <field name="id" reporter:datatype="id" />
1644                         <field name="value" oils_persist:i18n="true" />
1645                 </fields>
1646                 <links/>
1647         </class>
1648         <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">
1649                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1650                         <field name="balance_owed" reporter:datatype="money" />
1651                         <field name="total_owed" reporter:datatype="money" />
1652                         <field name="total_paid" reporter:datatype="money" />
1653                         <field name="usr" reporter:datatype="link"/>
1654                 </fields>
1655                 <links>
1656                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1657         </links>
1658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1659             <actions>
1660                 <retrieve permission="VIEW_USER">
1661                     <context link="usr" field="home_ou"/>
1662                 </retrieve>
1663             </actions>
1664         </permacrud>
1665         </class>
1666         <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">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1668                         <field name="collector" />
1669                         <field name="enter_time" reporter:datatype="timestamp"/>
1670                         <field name="id" reporter:datatype="id" />
1671                         <field name="location" reporter:datatype="link"/>
1672                         <field name="usr" reporter:datatype="link"/>
1673                 </fields>
1674                 <links>
1675                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1676                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1677                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1678                 </links>
1679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1680             <actions>
1681                 <create permission="money.collections_tracker.create" context_field="location"/>
1682                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1683                 <delete permission="money.collections_tracker.create" context_field="location"/>
1684             </actions>
1685         </permacrud>
1686         </class>
1687         <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">
1688                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1689                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1690                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1691                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1692                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1693                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1694                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1695                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1696                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1697                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1698                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1699                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1700                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1701                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1702                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1703                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1704                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1705                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1706                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1707                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1708                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1709                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1710                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1711                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1712                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1713                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1714                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1715                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1716                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1717                 </fields>
1718                 <links>
1719                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1722                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1723                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1724                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1725                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1726                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1727                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1728                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1729                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1730                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1731                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1732                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1733                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1734                 </links>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_MARC" global_required="true"/>
1740             </actions>
1741         </permacrud>
1742         </class>
1743         <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">
1744                 <fields oils_persist:primary="id">
1745                         <field name="dow_0_close" />
1746                         <field name="dow_0_open" />
1747                         <field name="dow_1_close" />
1748                         <field name="dow_1_open" />
1749                         <field name="dow_2_close" />
1750                         <field name="dow_2_open" />
1751                         <field name="dow_3_close" />
1752                         <field name="dow_3_open" />
1753                         <field name="dow_4_close" />
1754                         <field name="dow_4_open" />
1755                         <field name="dow_5_close" />
1756                         <field name="dow_5_open" />
1757                         <field name="dow_6_close" />
1758                         <field name="dow_6_open" />
1759                         <field name="id" reporter:datatype="id" />
1760                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1761                 </fields>
1762                 <links>
1763                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1764                 </links>
1765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1766             <actions>
1767                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1768                 <retrieve/>
1769                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1770                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1771             </actions>
1772         </permacrud>
1773         </class>
1774         <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">
1775                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1776                         <field name="close_end" reporter:datatype="timestamp" />
1777                         <field name="close_start" reporter:datatype="timestamp" />
1778                         <field name="id" reporter:datatype="id" />
1779                         <field name="org_unit" reporter:datatype="org_unit"/>
1780                         <field name="reason" reporter:datatype="text"/>
1781                 </fields>
1782                 <links>
1783                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1784                 </links>
1785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1786             <actions>
1787                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1788                 <retrieve/>
1789                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1790                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1791             </actions>
1792         </permacrud>
1793         </class>
1794         <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">
1795                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1796                         <field name="extended" reporter:datatype="interval"/>
1797                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1798                         <field name="max_renewals" reporter:datatype="int" />
1799                         <field name="name" reporter:datatype="text"/>
1800                         <field name="normal" reporter:datatype="interval"/>
1801                         <field name="shrt" reporter:datatype="interval"/>
1802                 </fields>
1803                 <links>
1804                 </links>
1805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1806             <actions>
1807                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1808                 <retrieve/>
1809                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1810                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1811             </actions>
1812         </permacrud>
1813         </class>
1814         <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">
1815                 <fields oils_persist:primary="id" oils_persist:sequence="">
1816                         <field name="balance_owed" reporter:datatype="money"/>
1817                         <field name="id" reporter:datatype="id" />
1818                         <field name="last_billing_note" reporter:datatype="text"/>
1819                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1820                         <field name="last_billing_type" reporter:datatype="text"/>
1821                         <field name="last_payment_note" reporter:datatype="text"/>
1822                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1823                         <field name="last_payment_type" reporter:datatype="text"/>
1824                         <field name="total_owed" reporter:datatype="money"/>
1825                         <field name="total_paid" reporter:datatype="money"/>
1826                         <field name="usr" reporter:datatype="link"/>
1827                         <field name="xact_finish" reporter:datatype="timestamp" />
1828                         <field name="xact_start" reporter:datatype="timestamp" />
1829                         <field name="xact_type" reporter:datatype="text"/>
1830                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1831                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1832                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1833                         <field name="billing_location" reporter:datatype="link"/>
1834                 </fields>
1835                 <links>
1836                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1837                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1838                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1839                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1840                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1841                 </links>
1842         </class>
1843         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1844                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1845                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1846                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1847                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1848                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1849                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1850                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1851                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1854                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1855                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1856                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1857                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1858                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1859                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1860                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1861                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1862                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1863                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1864                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1865                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1866                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1867                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1868                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1869                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1870                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1871                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1872                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1873                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1874                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1875                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1876                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1877                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1878                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1879                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1880                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1881                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1882                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1883                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1884                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1885                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1886                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1887                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1888                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1889                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1890                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1891                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1892                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1893                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1894                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1895                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1896                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1897                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1898                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1899                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1900                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1901                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1902                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1903                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1904                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1905                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1906                 </fields>
1907                 <links>
1908                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1909                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1910                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1911                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1912                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1913                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1914                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1915                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1916                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1917                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1918                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1919                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1920                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1921                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1922                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1923                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1924                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1925                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1926                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1927                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1928                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1929                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1930                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1931                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1932                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1933                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1934                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1935                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1936                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1937                 </links>
1938         </class>
1939
1940         <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">
1941                 <fields oils_persist:primary="name">
1942                         <field name="name" reporter:datatype="text"/>
1943                         <field name="label" reporter:datatype="text"/>
1944                         <field name="description" reporter:datatype="text"/>
1945                         <field name="datatype" reporter:datatype="text"/>
1946                         <field name="fm_class" reporter:datatype="text"/>
1947                 </fields>
1948                 <links>
1949                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1950                 </links>
1951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952                         <actions>
1953                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1954                                 <retrieve/>
1955                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1956                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1957                         </actions>
1958                 </permacrud>
1959         </class>
1960         <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">
1961                 <fields oils_persist:primary="name">
1962                         <field name="name" reporter:datatype="text"/>
1963                         <field name="label" reporter:datatype="text"/>
1964                         <field name="description" reporter:datatype="text"/>
1965                         <field name="datatype" reporter:datatype="text"/>
1966                         <field name="view_perm" reporter:datatype="link"/>
1967                         <field name="update_perm" reporter:datatype="link"/>
1968                         <field name="fm_class" reporter:datatype="text"/>
1969                 </fields>
1970                 <links>
1971                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1972                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
1973                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
1974                 </links>
1975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1976                         <actions>
1977                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1978                                 <retrieve/>
1979                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1980                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1981                         </actions>
1982                 </permacrud>
1983         </class>
1984         <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">
1985                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1986                         <field name="id" />
1987                         <field name="name"  reporter:datatype="text"/>
1988                         <field name="org_unit" reporter:datatype="org_unit"/>
1989                         <field name="value"  reporter:datatype="text"/>
1990                 </fields>
1991                 <links>
1992                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1993                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1994                 </links>
1995         </class>
1996         <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">
1997                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1998                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1999                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2000                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2001                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2002                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2003                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2004                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2005                 </fields>
2006                 <links>
2007                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2008                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2009                 </links>
2010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2011             <actions>
2012                 <create permission="CREATE_COPY_NOTE">
2013                     <context link="owning_copy" field="circ_lib"/>
2014                 </create>
2015                 <retrieve permission="VIEW_COPY_NOTES">
2016                     <context link="owning_copy" field="circ_lib"/>
2017                 </retrieve>
2018                 <update permission="UPDATE_COPY_NOTE">
2019                     <context link="owning_copy" field="circ_lib"/>
2020                 </update>
2021                 <delete permission="DELETE_COPY_NOTE">
2022                     <context link="owning_copy" field="circ_lib"/>
2023                 </delete>
2024             </actions>
2025         </permacrud>
2026         </class>
2027         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2028                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2029                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2030                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2031                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2032                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2033                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2034                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2035                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2036                 </fields>
2037                 <links>
2038                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2039                 </links>
2040         </class>
2041         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2043                         <field name="fingerprint"  reporter:datatype="text"/>
2044                         <field name="id" reporter:datatype="id" />
2045                         <field name="master_record" reporter:datatype="link"/>
2046                         <field name="mods"  reporter:datatype="text"/>
2047                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2048                 </fields>
2049                 <links>
2050                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2051                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2052                 </links>
2053         </class>
2054         <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">
2055                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2056                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2057                         <field name="name"  reporter:datatype="text"/>
2058                 </fields>
2059                 <links/>
2060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061             <actions>
2062                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2063                 <retrieve/>
2064                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2065                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2066             </actions>
2067         </permacrud>
2068         </class>
2069         <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">
2070                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2071                         <field name="code"  reporter:datatype="text"/>
2072                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2073                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2074                 </fields>
2075                 <links/>
2076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2077             <actions>
2078                 <create permission="CREATE_PERM" global_required="true"/>
2079                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2080                 <update permission="UPDATE_PERM" global_required="true"/>
2081                 <delete permission="DELETE_PERM" global_required="true"/>
2082             </actions>
2083         </permacrud>
2084         </class>
2085         <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">
2086                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2087                         <field name="id" reporter:datatype="id" />
2088                         <field name="metarecord" reporter:datatype="link"/>
2089                         <field name="source" reporter:datatype="link"/>
2090                 </fields>
2091                 <links>
2092                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2093                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2094                 </links>
2095         </class>
2096         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" reporter:label="Combined Facet Entry View" oils_persist:readonly="true">
2097                 <oils_persist:source_definition>
2098                         SELECT * FROM (
2099                                 SELECT * FROM metabib.author_field_entry
2100                                                 UNION ALL
2101                                 SELECT * FROM metabib.keyword_field_entry
2102                                                 UNION ALL
2103                                 SELECT * FROM metabib.title_field_entry
2104                                                 UNION ALL
2105                                 SELECT * FROM metabib.subject_field_entry
2106                                                 UNION ALL
2107                                 SELECT * FROM metabib.series_field_entry
2108                         )x
2109                         WHERE x.index_vector = ''
2110                 </oils_persist:source_definition>
2111                 <fields>
2112                         <field name="field" reporter:datatype="link"/>
2113                         <field name="id" reporter:datatype="id" />
2114                         <field name="source" reporter:datatype="link"/>
2115                         <field name="value"  reporter:datatype="text"/>
2116                 </fields>
2117                 <links>
2118                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2119                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2120                 </links>
2121         </class>
2122         <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">
2123                 <oils_persist:source_definition>
2124                         SELECT * FROM metabib.author_field_entry
2125                                                 UNION ALL
2126                         SELECT * FROM metabib.keyword_field_entry
2127                                                 UNION ALL
2128                         SELECT * FROM metabib.title_field_entry
2129                                                 UNION ALL
2130                         SELECT * FROM metabib.subject_field_entry
2131                                                 UNION ALL
2132                         SELECT * FROM metabib.series_field_entry
2133                 </oils_persist:source_definition>
2134                 <fields>
2135                         <field name="field" reporter:datatype="link"/>
2136                         <field name="id" reporter:datatype="id" />
2137                         <field name="source" reporter:datatype="link"/>
2138                         <field name="value"  reporter:datatype="text"/>
2139                 </fields>
2140                 <links>
2141                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2142                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2143                 </links>
2144         </class>
2145         <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">
2146                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2147                         <field name="field" reporter:datatype="link"/>
2148                         <field name="id" reporter:datatype="id" />
2149                         <field name="source" reporter:datatype="link"/>
2150                         <field name="value"  reporter:datatype="text"/>
2151                 </fields>
2152                 <links>
2153                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2154                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2155                 </links>
2156         </class>
2157         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2158                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2159                         <field name="accepting_usr" reporter:datatype="link"/>
2160                         <field name="amount" reporter:datatype="money" />
2161                         <field name="amount_collected" reporter:datatype="money" />
2162                         <field name="cash_drawer" reporter:datatype="link"/>
2163                         <field name="id" reporter:datatype="id" />
2164                         <field name="note"  reporter:datatype="text"/>
2165                         <field name="payment_ts" reporter:datatype="timestamp"/>
2166                         <field name="xact" reporter:datatype="link"/>
2167                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2168                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2169                 </fields>
2170                 <links>
2171                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2172                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2173                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2174                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2175                 </links>
2176         </class>
2177         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2178                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2179                         <field name="accepting_usr" reporter:datatype="link"/>
2180                         <field name="amount" reporter:datatype="money" />
2181                         <field name="amount_collected" reporter:datatype="money" />
2182                         <field name="id" reporter:datatype="id" />
2183                         <field name="note"  reporter:datatype="text"/>
2184                         <field name="payment_ts" reporter:datatype="timestamp"/>
2185                         <field name="xact" reporter:datatype="link"/>
2186                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2187                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2188                 </fields>
2189                 <links>
2190                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2191                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2192                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2193                 </links>
2194         </class>
2195         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2197                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2198                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2199                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2200                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2201                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2202                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2203                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2204                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2205                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2206                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2207                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2208                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2209                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2210                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2211                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2212                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2213                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2214                 </fields>
2215                 <links>
2216                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2217                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2218                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2219                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2220                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2221                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2222                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2223                 </links>
2224         </class>
2225
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2228                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2229                         <field name="name"  reporter:datatype="text"/>
2230                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2231                         <field name="block_list" reporter:datatype="text"/>
2232                         <field name="org_depth" reporter:datatype="int"/>
2233                 </fields>
2234                 <links/>
2235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2236             <actions>
2237                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2238                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2239                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2240                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2241             </actions>
2242         </permacrud>
2243         </class>
2244         <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">
2245                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2246                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2247                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2248                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2249                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2250                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2251                 </fields>
2252                 <links>
2253                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2254                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2255                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2256         </links>
2257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2258             <actions>
2259                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2260                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2261                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2262                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2263             </actions>
2264         </permacrud>
2265         </class>
2266         <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">
2267                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2268                         <field name="holdable" reporter:datatype="bool"/>
2269                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2270                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2271                         <field name="opac_visible" reporter:datatype="bool"/>
2272                 </fields>
2273                 <links/>
2274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2275             <actions>
2276                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2277                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
2278                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2279                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2280             </actions>
2281         </permacrud>
2282         </class>
2283         <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">
2284                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2285                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2286                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2287                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2288                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2289                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2290                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2291                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2292                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2293                 </fields>
2294                 <links>
2295                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2296                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2297                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2298                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2299                 </links>
2300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2301                         <actions>
2302                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2303                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2304                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2305                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2306                         </actions>
2307                 </permacrud>
2308         </class>
2309         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2310                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2311                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2312                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2313                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2314                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2315                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2316                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2317                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2318                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2319                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2320                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2321                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2322                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2323                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2324                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2325                 </fields>
2326                 <links>
2327                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2328                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2329                 </links>
2330         </class>
2331         <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">
2332                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2333                         <field name="call_number" />
2334                         <field name="create_date" reporter:datatype="timestamp"/>
2335                         <field name="creator" reporter:datatype="link"/>
2336                         <field name="id" reporter:datatype="id" />
2337                         <field name="pub" reporter:datatype="bool"/>
2338                         <field name="title"  reporter:datatype="text"/>
2339                         <field name="value"  reporter:datatype="text"/>
2340                 </fields>
2341                 <links>
2342                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2343                 </links>
2344         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2345             <actions>
2346                 <create permission="CREATE_VOLUME_NOTE">
2347                     <context link="call_number" field="owning_lib"/>
2348                 </create>
2349                 <retrieve permission="VIEW_VOLUME_NOTES">
2350                     <context link="call_number" field="owning_lib"/>
2351                 </retrieve>
2352                 <update permission="UPDATE_VOLUME_NOTE">
2353                     <context link="call_number" field="owning_lib"/>
2354                 </update>
2355                 <delete permission="DELETE_VOLUME_NOTE">
2356                     <context link="call_number" field="owning_lib"/>
2357                 </delete>
2358             </actions>
2359         </permacrud>
2360         </class>
2361         <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">
2362                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2363                         <field name="create_date" reporter:datatype="timestamp"/>
2364                         <field name="creator" reporter:datatype="link"/>
2365                         <field name="edit_date" reporter:datatype="timestamp"/>
2366                         <field name="editor" reporter:datatype="link"/>
2367                         <field name="id" reporter:datatype="id" />
2368                         <field name="record" reporter:datatype="link"/>
2369                         <field name="value" reporter:datatype="text"/>
2370                 </fields>
2371                 <links>
2372                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2373                 </links>
2374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2375             <actions>
2376                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2377                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2378                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2379                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2380             </actions>
2381         </permacrud>
2382         </class>
2383         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2384                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2385                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2386                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2387                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2388                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2389                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2390                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2391                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2393                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2394                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2395                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2396                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2397                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2398                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2399                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2400                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2401                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2402                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2403                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2404                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2405                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2406                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2407                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2408                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2409                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2410                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2411                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2412                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2413                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2414                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2415                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2416                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2417                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2418                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2419                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2420                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2421                 </fields>
2422                 <links>
2423                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2424                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2425                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2426                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2427                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2428                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2429                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2430                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2431                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2432                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2433                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2434                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2435                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2436                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2437                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2438                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2439                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2440                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2441                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2442                 </links>
2443         </class>
2444         <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">
2445                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2446                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2447                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2448                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2449                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2450                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2451                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2452                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2453                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2454                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2455                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2456                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2457                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2458                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2459                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2460                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2461                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2462                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2463                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2464                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2465                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2466                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2467                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2468                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2469                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2470                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2471                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2472                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2473                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2474                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2475                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2476                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2477                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2478                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2479                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2480                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2481                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2482                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2483                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2484                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2485                 </fields>
2486                 <links>
2487                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2488                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2489                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2490                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2491                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2492                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2493                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2494                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2495                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2496                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2497                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2498                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2499                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2500                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2501                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2502                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2503                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2504                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2505                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2506                 </links>
2507         </class>
2508         <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">
2509                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2510                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2511                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2512                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2513                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2514                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2515                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2516                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2517                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2518                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2519                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2520                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2521                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2522                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2523                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2524                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2525                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2526                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2527                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2528                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2529                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2530                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2531                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2532                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2533                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2534                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2535                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2536                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2537                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2538                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2539                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2540                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2541                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2542                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2543                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2544                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2545                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2546                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2547                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2548                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2549                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2550                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2551                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2552                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2553                 </fields>
2554                 <links>
2555                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2556                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2557                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2558                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2559                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2560                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2561                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2562                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2563                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2564                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2565                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2566                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2567                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2568                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2569                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2570                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2571                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2572                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2573                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2574                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2575                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2576                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2577                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2578                 </links>
2579         </class>
2580
2581         <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">
2582                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2583                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2584                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2585                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2586                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2587                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2588                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2589                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2590                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2591                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2592                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2593                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2594                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2595                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2596                 </fields>
2597                 <links>
2598                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2599                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2600                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2601                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2602                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2603                 </links>
2604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2605                         <actions>
2606                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2607                                 <retrieve />
2608                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2609                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2610                         </actions>
2611                 </permacrud>
2612         </class>
2613
2614         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2616                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2617                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2618                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2619                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2620                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2621                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2622                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2623                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2624                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2625                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2626                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2627                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2628                 </fields>
2629                 <links>
2630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2631                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2632                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2633                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2634                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2635                 </links>
2636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2637                         <actions>
2638                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2639                                 <retrieve />
2640                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2641                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2642                         </actions>
2643                 </permacrud>
2644         </class>
2645         
2646         <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">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2648                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2649                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2650                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2651                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2652                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2653                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2655                 </fields>
2656                 <links>
2657                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2658                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2659                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2660                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2661                 </links>
2662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2663                         <actions>
2664                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2665                                 <retrieve />
2666                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2667                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2668                         </actions>
2669                 </permacrud>
2670         </class>
2671         
2672         <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">
2673                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2674                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2675                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2676                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2677                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2678                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2679                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2680                 </fields>
2681                 <links>
2682                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2683                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2684                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2685                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2686                 </links>
2687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2688                         <actions>
2689                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2690                                 <retrieve />
2691                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2692                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2693                         </actions>
2694                 </permacrud>
2695         </class>
2696         
2697         <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">
2698                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2699                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2700                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2701                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2702                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2703                 </fields>
2704                 <links>
2705                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2706                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2707                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2708                 </links>
2709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2710                         <actions>
2711                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2712                                 <retrieve />
2713                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2714                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2715                         </actions>
2716                 </permacrud>
2717         </class>
2718         
2719         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2720                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2721                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2722                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2723                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2724                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2725                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2726                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2727                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2728                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2729                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2730                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2731                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2732                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2733                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2734                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2735                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2736                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2737                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2738                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2739                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2740                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2741                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2742                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2743                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2744                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2745                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2746                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2747                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2748                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2749                 </fields>
2750                 <links>
2751                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2752                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2753                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2754                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2755                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2756                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2757                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2758                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2759                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2760                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2761                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2762                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2763                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2764                 </links>
2765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2766                         <actions>
2767                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2768                                 <retrieve />
2769                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2770                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2771                         </actions>
2772                 </permacrud>
2773         </class>
2774         
2775         <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">
2776                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2777                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2778                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2779                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2780                 </fields>
2781                 <links>
2782                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2783                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2784                 </links>
2785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2786                         <actions>
2787                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2788                                 <retrieve />
2789                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2790                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2791                         </actions>
2792                 </permacrud>
2793         </class>
2794
2795         <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">
2796                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2797                         <field name="bucket" reporter:datatype="link"/>
2798                         <field name="id" reporter:datatype="id" />
2799                         <field name="target_call_number" reporter:datatype="link" />
2800                         <field name="create_time" reporter:datatype="timestamp" />
2801                         <field name="pos" reporter:datatype="int" />
2802                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2803                 </fields>
2804                 <links>
2805                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2806                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2807             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2808                 </links>
2809         </class>
2810         <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">
2811                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2812                         <field name="id" reporter:datatype="id" />
2813                         <field name="item" reporter:datatype="link"/>
2814                         <field name="note" reporter:datatype="text" />
2815                 </fields>
2816                 <links>
2817                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2818                 </links>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2822                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2823                         <field name="btype" reporter:datatype="text"/>
2824                         <field name="id" reporter:datatype="id" />
2825                         <field name="name" reporter:datatype="text"/>
2826                         <field name="owner" reporter:datatype="link"/>
2827                         <field name="pub" reporter:datatype="bool"/>
2828                         <field name="create_time" reporter:datatype="timestamp" />
2829                 </fields>
2830                 <links>
2831                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2832                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2833                 </links>
2834         </class>
2835         <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">
2836                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2837                         <field name="id" reporter:datatype="id" />
2838                         <field name="bucket" reporter:datatype="link"/>
2839                         <field name="note" reporter:datatype="text" />
2840                 </fields>
2841                 <links>
2842                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2843                 </links>
2844         </class>
2845         <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">
2846                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2847                         <field name="hold" reporter:datatype="link"/>
2848                         <field name="id" reporter:datatype="id" />
2849                         <field name="target_copy" reporter:datatype="link"/>
2850                 </fields>
2851                 <links>
2852                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2853                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2854                 </links>
2855         </class>
2856         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2857                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2858                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2859                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2860                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2861                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2862                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2863                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2864                 </fields>
2865                 <links>
2866                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2867                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2868                 </links>
2869         </class>
2870         <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">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2872                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2873                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2874                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2875                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2876                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2877                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2878                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2879                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2880                 </fields>
2881                 <links>
2882                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2883                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2884                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2885                 </links>
2886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887             <actions>
2888                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2889                 <retrieve/>
2890                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2891                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2892             </actions>
2893         </permacrud>
2894         </class>
2895
2896     <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">
2897         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2898             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2899             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2900             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2901             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2902         </fields>
2903         <links>
2904             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2905             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2906         </links>
2907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2908             <actions>
2909                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2910                 <retrieve/>
2911                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2912                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2913             </actions>
2914         </permacrud>
2915     </class>
2916
2917         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2918                 <fields>
2919                         <field name="id" oils_persist:virtual="true" />
2920                         <field name="location" oils_persist:virtual="true" />
2921                         <field name="owning_lib" oils_persist:virtual="true" />
2922                         <field name="holdings" oils_persist:virtual="true" />
2923                         <field name="current_holdings" oils_persist:virtual="true" />
2924                         <field name="supplements" oils_persist:virtual="true" />
2925                         <field name="current_supplements" oils_persist:virtual="true" />
2926                         <field name="indexes" oils_persist:virtual="true" />
2927                         <field name="current_indexes" oils_persist:virtual="true" />
2928                         <field name="online" oils_persist:virtual="true" />
2929                         <field name="missing" oils_persist:virtual="true" />
2930                         <field name="incomplete" oils_persist:virtual="true" />
2931                 </fields>
2932         </class>
2933         <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">
2934                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2935                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2936                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2937                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2938                         <field reporter:label="Creator" name="creator" />
2939                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2940                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2941                         <field reporter:label="Editor" name="editor" />
2942                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2943                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2944                         <field reporter:label="MARC" name="marc" />
2945                         <field reporter:label="Source" name="source" />
2946                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2947                 </fields>
2948                 <links>
2949                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2950                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2951                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2952                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2953                 </links>
2954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2955                         <actions>
2956                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2957                                 <retrieve/>
2958                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2959                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2960                         </actions>
2961                 </permacrud>
2962         </class>
2963         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2964                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2965                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2966                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2967                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2968                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2969                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2970                 </fields>
2971                 <links>
2972                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2973                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2974                 </links>
2975         </class>
2976         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2977                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2978                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2979                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2980                         <field reporter:label="Label" name="label" />
2981                 </fields>
2982                 <links>
2983                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2984                 </links>
2985         </class>
2986         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2987                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2988                         <field name="id" reporter:datatype="id" />
2989                         <field name="subscription" reporter:datatype="link"/>
2990                         <field name="target_copy" reporter:datatype="link"/>
2991                         <field name="location" reporter:datatype="link"/>
2992                         <field name="binding_unit" reporter:datatype="link"/>
2993                         <field name="label" />
2994                 </fields>
2995                 <links>
2996                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2997                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2998                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2999                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
3000                 </links>
3001         </class>
3002         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
3003                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
3004                         <field name="id" reporter:datatype="id" />
3005                         <field name="subscription" reporter:datatype="link"/>
3006                         <field name="generated_coverage" reporter:datatype="text"/>
3007                         <field name="textual_holdings" reporter:datatype="text"/>
3008                 </fields>
3009                 <links>
3010                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3011                 </links>
3012         </class>
3013         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
3014                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
3015                         <field name="id" reporter:datatype="id" />
3016                         <field name="subscription" reporter:datatype="link"/>
3017                         <field name="generated_coverage" reporter:datatype="text"/>
3018                         <field name="textual_holdings" reporter:datatype="text"/>
3019                 </fields>
3020                 <links>
3021                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3022                 </links>
3023         </class>
3024         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
3025                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3026                         <field name="id" reporter:datatype="id" />
3027                         <field name="subscription" reporter:datatype="link"/>
3028                         <field name="generated_coverage" reporter:datatype="text"/>
3029                         <field name="textual_holdings" reporter:datatype="text"/>
3030                 </fields>
3031                 <links>
3032                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3033                 </links>
3034         </class>
3035
3036         <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">
3037                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3038                         <field name="id" reporter:datatype="id" />
3039                         <field name="owning_copy" reporter:datatype="link"/>
3040                         <field name="stat_cat" reporter:datatype="link"/>
3041                         <field name="stat_cat_entry" reporter:datatype="link"/>
3042                 </fields>
3043                 <links>
3044                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3045                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3046                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3047                 </links>
3048         </class>
3049         <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">
3050                 <fields oils_persist:primary="code">
3051                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3052                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3053                 </fields>
3054                 <links/>
3055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3056             <actions>
3057                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3058                 <retrieve/>
3059                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3060                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3061             </actions>
3062         </permacrud>
3063         </class>
3064         <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">
3065                 <fields oils_persist:primary="code">
3066                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3067                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3068                 </fields>
3069                 <links/>
3070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071             <actions>
3072                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3073                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3074                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3075                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3076             </actions>
3077         </permacrud>
3078         </class>
3079         <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">
3080                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3081                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3082                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3083                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3084                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3085                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3086                 </fields>
3087                 <links>
3088             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3089         </links>
3090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3093                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3094                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3095                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3096             </actions>
3097         </permacrud>
3098         </class>
3099         <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">
3100                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3101                         <field name="id" reporter:datatype="id" />
3102                         <field name="name" reporter:datatype="text"/>
3103                 </fields>
3104                 <links/>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="CREATE_LASSO" global_required="true"/>
3108                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3109                 <update permission="UPDATE_LASSO" global_required="true"/>
3110                 <delete permission="DELETE_LASSO" global_required="true"/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114         <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">
3115                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3116                         <field name="id" reporter:datatype="id" />
3117                         <field name="lasso" reporter:datatype="link"/>
3118                         <field name="org_unit" reporter:datatype="org_unit"/>
3119                 </fields>
3120                 <links>
3121                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3122                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3123                 </links>
3124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3125             <actions>
3126                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3127                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3128                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3129                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3130             </actions>
3131         </permacrud>
3132         </class>
3133         <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">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3135                         <field name="id" reporter:datatype="id" />
3136                         <field name="from_org" reporter:datatype="org_unit"/>
3137                         <field name="to_org" reporter:datatype="org_unit"/>
3138                         <field name="prox" reporter:datatype="int" />
3139                 </fields>
3140                 <links>
3141                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3142                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3143                 </links>
3144         </class>
3145         <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">
3146                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3147                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3148                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3149                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3150                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3151                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3152                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3153                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3154                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3155                 </fields>
3156                 <links/>
3157         </class>
3158         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3160                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3161                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3162                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3163                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3164                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3165                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3166                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3167                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3168                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3169                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3170                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3171                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3172                 </fields>
3173                 <links>
3174                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3175                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3176                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3177                 </links>
3178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3179             <actions>
3180                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3181                 <retrieve/>
3182                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3183                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3184             </actions>
3185         </permacrud>
3186         </class>
3187         <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">
3188                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3189                         <field name="address_type"  reporter:datatype="text"/>
3190                         <field name="city"  reporter:datatype="text"/>
3191                         <field name="country"  reporter:datatype="text"/>
3192                         <field name="county"  reporter:datatype="text"/>
3193                         <field name="id" reporter:datatype="id" />
3194                         <field name="org_unit" reporter:datatype="org_unit"/>
3195                         <field name="post_code"  reporter:datatype="text"/>
3196                         <field name="state"  reporter:datatype="text"/>
3197                         <field name="street1"  reporter:datatype="text"/>
3198                         <field name="street2"  reporter:datatype="text"/>
3199                         <field name="valid" reporter:datatype="bool"/>
3200                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3201                 </fields>
3202                 <links>
3203                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3204                 </links>
3205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3206             <actions>
3207                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3208                 <retrieve/>
3209                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3210                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3211             </actions>
3212         </permacrud>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3216                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3217                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3218                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3219                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3220                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3221                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3222                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3223                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3224                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3225                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3226                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3227                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3228                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3229                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3230                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3231                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3232                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3233                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3234                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3235                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3236                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3237                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3238                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3239                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3240                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3241                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3243                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3245                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3246                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3247                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3248                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3249                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3250                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3251                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3252                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3253                 </fields>
3254                 <links>
3255                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3256                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3257                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3258                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3259                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3260                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3261                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3262                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3263                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3264                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3265                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3266                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3267                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3268                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3269                 </links>
3270         </class>
3271         <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">
3272                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3273                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3274                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3275                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3276                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3277                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3278                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3279                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3280                 </fields>
3281                 <links>
3282                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3283                 </links>
3284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3285                         <actions>
3286                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3287                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3288                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3289                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3290                         </actions>
3291                 </permacrud>
3292         </class>
3293         <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">
3294                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3295                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3296                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3297                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3298                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3299                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3300                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3301                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3302                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3303                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3304                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3305                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3306                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3307                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3308                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3309                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3310                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3311                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3312                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3313                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3314                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3315                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3316                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3317                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3318                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3319                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3320                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3321                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3323                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3325                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3326                 </fields>
3327                 <links>
3328                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3329                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3330                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3331                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3332                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3333                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3334                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3335                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3336                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3337                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3338                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3339                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3340                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3341                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3342                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3343                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3344                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3345                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3346                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3347                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3348                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3349                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3350                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3351                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3352                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3353                 </links>
3354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3355             <actions>
3356                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3357                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3358                     <context field="id"/>
3359                     <context field="parent_ou"/>
3360                                 </retrieve>
3361                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3362                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3363             </actions>
3364         </permacrud>
3365         </class>
3366         <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">
3367                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3368                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3369                         <field name="btype" reporter:datatype="text"/>
3370                         <field name="id" reporter:datatype="id" />
3371                         <field name="name"  reporter:datatype="text"/>
3372                         <field name="owner" reporter:datatype="link"/>
3373                         <field name="pub" reporter:datatype="bool"/>
3374                         <field name="create_time" reporter:datatype="timestamp" />
3375                 </fields>
3376                 <links>
3377                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3378                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3379                 </links>
3380         </class>
3381         <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">
3382                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3383                         <field name="id" reporter:datatype="id" />
3384                         <field name="bucket" reporter:datatype="link"/>
3385                         <field name="note" reporter:datatype="text" />
3386                 </fields>
3387                 <links>
3388                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3389                 </links>
3390         </class>
3391         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3392                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3393                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3394                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3395                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3396                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3397                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3398                 </fields>
3399                 <links>
3400                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3401                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3402                 </links>
3403         </class>
3404         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3405                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3406                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3407                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3408                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3409                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3410                 </fields>
3411                 <links>
3412                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3413                 </links>
3414         </class>
3415         <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">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3417                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3418                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3419                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3420                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3421                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3422                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3423                 </fields>
3424                 <links>
3425                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3426                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3427                 </links>
3428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3429             <actions>
3430                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3431                 <retrieve />
3432                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3433                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3434             </actions>
3435         </permacrud>
3436         </class>
3437         <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">
3438                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3439                         <field name="field" reporter:datatype="link"/>
3440                         <field name="id" reporter:datatype="id" />
3441                         <field name="source" reporter:datatype="link"/>
3442                         <field name="value"  reporter:datatype="text"/>
3443                 </fields>
3444                 <links>
3445                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3446                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3447                 </links>
3448         </class>
3449         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3451                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3452                         <field name="btype" reporter:datatype="text"/>
3453                         <field name="id" reporter:datatype="id" />
3454                         <field name="name"  reporter:datatype="text"/>
3455                         <field name="owner" reporter:datatype="link"/>
3456                         <field name="pub" reporter:datatype="bool"/>
3457                         <field name="create_time" reporter:datatype="timestamp" />
3458                 </fields>
3459                 <links>
3460                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3461                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3462                 </links>
3463         </class>
3464         <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">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3466                         <field name="id" reporter:datatype="id" />
3467                         <field name="bucket" reporter:datatype="link"/>
3468                         <field name="note" reporter:datatype="text" />
3469                 </fields>
3470                 <links>
3471                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3472                 </links>
3473         </class>
3474         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3475                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3476                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3477                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3478                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3479                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3480                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3481                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3482                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3483                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3484                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3485                 </fields>
3486                 <links>
3487                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3488                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3489                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3490                 </links>
3491         </class>
3492         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3494                         <field name="id" reporter:datatype="id" />
3495                         <field name="ind1" />
3496                         <field name="ind2" />
3497                         <field name="record" />
3498                         <field name="subfield" />
3499                         <field name="tag" />
3500                         <field name="value" />
3501                 </fields>
3502                 <links>
3503                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3504                 </links>
3505         </class>
3506         <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">
3507                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3508                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3509                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3510                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3511                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3512                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3513                 </fields>
3514                 <links>
3515                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3516                 </links>
3517         </class>
3518         <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">
3519                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3520                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3521                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3522                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3523                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3524                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3525                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3526                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3527                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3528                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3529                 </fields>
3530                 <links>
3531                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3532                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3533                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3534                 </links>
3535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3536             <actions>
3537                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3538                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3539                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3540                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3541             </actions>
3542         </permacrud>
3543         </class>
3544         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3545                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3546                         <field name="create_date" reporter:datatype="timestamp"/>
3547                         <field name="creator" reporter:datatype="link"/>
3548                         <field name="edit_date" reporter:datatype="timestamp"/>
3549                         <field name="editor" reporter:datatype="link"/>
3550                         <field name="id" reporter:datatype="id" />
3551                         <field name="pub" reporter:datatype="bool"/>
3552                         <field name="record" reporter:datatype="link"/>
3553                         <field name="value"  reporter:datatype="text"/>
3554                 </fields>
3555                 <links>
3556                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3557                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3558                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3559                 </links>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3563                         <field name="balance_owed" reporter:datatype="money" />
3564                         <field name="total_owed" reporter:datatype="money" />
3565                         <field name="total_paid" reporter:datatype="money" />
3566                         <field name="usr" reporter:datatype="link"/>
3567                 </fields>
3568                 <links>
3569                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3570                 </links>
3571         </class>
3572         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3573                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3574                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3575                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3576                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3577                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3578                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3579                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3580                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3581                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3582                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3583                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3584                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3585                 </fields>
3586                 <links>
3587                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3588                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3589                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3590                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3591                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3592                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3593                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3594                 </links>
3595         </class>
3596         <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">
3597                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3598                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3599                         <field name="quality" reporter:datatype="int" />
3600                         <field name="source" reporter:datatype="text"/>
3601                         <field name="transcendant" reporter:datatype="bool"/>
3602                 </fields>
3603                 <links/>
3604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3605             <actions>
3606                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3607                 <retrieve/>
3608                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3609                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3610             </actions>
3611         </permacrud>
3612         </class>
3613         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3614                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3615                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3616                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3617                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3618                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3619                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3620                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3621                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3622                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3623                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3624                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3625                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3626                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3627                 </fields>
3628                 <links>
3629                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3630                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3631                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3632                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3633                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3634                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3635                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3636                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3637                 </links>
3638         </class>
3639         <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">
3640                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3641                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3642                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3643                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3644                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3645                 </fields>
3646                 <links>
3647                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3648                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3649                 </links>
3650         </class>
3651         <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">
3652                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3653                         <field name="bucket" reporter:datatype="link"/>
3654                         <field name="id" reporter:datatype="id" />
3655                         <field name="target_user" reporter:datatype="link"/>
3656                         <field name="create_time" reporter:datatype="timestamp" />
3657                         <field name="pos" reporter:datatype="int" />
3658                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3659                 </fields>
3660                 <links>
3661                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3662                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3663             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3664                 </links>
3665         </class>
3666         <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">
3667                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3668                         <field name="id" reporter:datatype="id" />
3669                         <field name="item" reporter:datatype="link"/>
3670                         <field name="note" reporter:datatype="text" />
3671                 </fields>
3672                 <links>
3673                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3674                 </links>
3675         </class>
3676         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3677                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3678                         <field name="balance_owed" reporter:datatype="money" />
3679                         <field name="total_owed" reporter:datatype="money" />
3680                         <field name="total_paid" reporter:datatype="money" />
3681                         <field name="usr" reporter:datatype="link"/>
3682                 </fields>
3683                 <links>
3684                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3685                 </links>
3686         </class>
3687         <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">
3688                 <fields oils_persist:primary="code" oils_persist:sequence="">
3689                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3690                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3691                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3692                 </fields>
3693                 <links/>
3694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3695             <actions>
3696                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3697                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3698                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3699                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3700             </actions>
3701         </permacrud>
3702         </class>
3703         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3704                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3705                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3706                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3707                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3708                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3709                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3710                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3711                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3712                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3713                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3714                 </fields>
3715                 <links>
3716                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3717                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3718                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3719                 </links>
3720         </class>
3721         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3722                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3723                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3724                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3725                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3726                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3727                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3728                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3729                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3730                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3732                 </fields>
3733                 <links>
3734                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3735                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3736                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3737                 </links>
3738         </class>
3739         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3740                 <fields oils_persist:primary="id" oils_persist:sequence="">
3741                         <field name="checkin_lib" reporter:datatype="link"/>
3742                         <field name="checkin_staff" reporter:datatype="link"/>
3743                         <field name="checkin_time" reporter:datatype="timestamp"/>
3744                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3745                         <field name="circ_staff" reporter:datatype="link"/>
3746                         <field name="desk_renewal" reporter:datatype="bool"/>
3747                         <field name="due_date" reporter:datatype="timestamp"/>
3748                         <field name="duration" reporter:datatype="interval"/>
3749                         <field name="duration_rule" reporter:datatype="link"/>
3750                         <field name="fine_interval" reporter:datatype="interval"/>
3751                         <field name="id" reporter:datatype="id" />
3752                         <field name="max_fine" reporter:datatype="money" />
3753                         <field name="max_fine_rule" reporter:datatype="link"/>
3754                         <field name="opac_renewal" reporter:datatype="bool"/>
3755                         <field name="phone_renewal" reporter:datatype="bool"/>
3756                         <field name="recurring_fine" reporter:datatype="money" />
3757                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3758                         <field name="renewal_remaining" reporter:datatype="int" />
3759                         <field name="stop_fines" reporter:datatype="text"/>
3760                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3761                         <field name="target_copy" reporter:datatype="link"/>
3762                         <field name="usr" reporter:datatype="link"/>
3763                         <field name="xact_finish" reporter:datatype="timestamp" />
3764                         <field name="xact_start" reporter:datatype="timestamp" />
3765                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3766                 </fields>
3767                 <links>
3768                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3769                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3770                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3771                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3772                 </links>
3773         </class>
3774         <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">
3775                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3776                         <field name="field" reporter:datatype="link"/>
3777                         <field name="id" reporter:datatype="id" />
3778                         <field name="source" reporter:datatype="link"/>
3779                         <field name="value" reporter:datatype="text"/>
3780                 </fields>
3781                 <links>
3782                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3783                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3784                 </links>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3788                         <field name="high" reporter:datatype="money" />
3789                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3790                         <field name="low" reporter:datatype="money" />
3791                         <field name="name" reporter:datatype="text"/>
3792                         <field name="normal" reporter:datatype="money" />
3793                         <field name="recurrence_interval" reporter:datatype="interval"/>
3794                 </fields>
3795                 <links/>
3796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797             <actions>
3798                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3799                 <retrieve/>
3800                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3801                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3802             </actions>
3803         </permacrud>
3804         </class>
3805         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3806                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3807                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3808                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3809                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3810                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3811                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3812                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3813                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3814                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3815                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3816                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3818                 </fields>
3819                 <links>
3820                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3821                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3823                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3824                 </links>
3825         </class>
3826         <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">
3827                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3828                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3829                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3830                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3831                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3832                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3833                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3834                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3835                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3836                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3837                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3838                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3839                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3840                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3841                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3842                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3843                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3844                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3845                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3846                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3847                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3848                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3849                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3850                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3851                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3852                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3853                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3854                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3855                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3856                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3857                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3858                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3859                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3860                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3861                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3862                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3863                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3864                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3865                 </fields>
3866                 <links>
3867                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3868                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3869                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3870                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3871                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3872                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3873                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3874                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3875                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3876                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3877                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3878                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3879                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3880                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3881                 </links>
3882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883             <actions>
3884                 <create permission="CREATE_COPY">
3885                     <context link="call_number" field="owning_lib"/>
3886                 </create>
3887                 <retrieve/>
3888                 <update permission="UPDATE_COPY">
3889                     <context link="call_number" field="owning_lib"/>
3890                 </update>
3891                 <delete permission="DELETE_COPY">
3892                     <context link="call_number" field="owning_lib"/>
3893                 </delete>
3894             </actions>
3895         </permacrud>
3896         </class>
3897         <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">
3898                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3899                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3900                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3901                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3902                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3903                 </fields>
3904                 <links/>
3905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3906             <actions>
3907                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3908                 <retrieve/>
3909                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3910                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3911             </actions>
3912         </permacrud>
3913         </class>
3914         <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">
3915                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3916                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3917                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3918                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3919                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3920                 </fields>
3921                 <links/>
3922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3923             <actions>
3924                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3925                 <retrieve/>
3926                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3927                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3928             </actions>
3929         </permacrud>
3930         </class>
3931         <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">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3933                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3935                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3936                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3937                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3938                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3939                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3940                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3941                 </fields>
3942                 <links>
3943                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3944                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3945                 </links>
3946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3947             <actions>
3948                 <create permission="CREATE_PERM" global_required="true"/>
3949                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3950                 <update permission="UPDATE_PERM" global_required="true"/>
3951                 <delete permission="DELETE_PERM" global_required="true"/>
3952             </actions>
3953         </permacrud>
3954         </class>
3955         <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">
3956                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3957                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3958                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3959                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3960                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3961                 </fields>
3962                 <links>
3963                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3964                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3965                 </links>
3966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3967             <actions>
3968                 <create permission="ADMIN_SURVEY">
3969                     <context link="question" jump="survey" field="owner"/>
3970                 </create>
3971                 <retrieve/>
3972                 <update permission="ADMIN_SURVEY">
3973                     <context link="question" jump="survey" field="owner"/>
3974                 </update>
3975                 <delete permission="ADMIN_SURVEY">
3976                     <context link="question" jump="survey" field="owner"/>
3977                 </delete>
3978             </actions>
3979         </permacrud>
3980         </class>
3981         <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">
3982                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3983                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3984                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3985                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3986                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3987                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3988                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3989                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3990                 </fields>
3991                 <links>
3992                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3993                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3994                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3995                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3996                 </links>
3997         </class>
3998         <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">
3999                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4000                         <field name="balance_owed" reporter:datatype="money" />
4001                         <field name="total_owed" reporter:datatype="money" />
4002                         <field name="total_paid" reporter:datatype="money" />
4003                         <field name="usr" reporter:datatype="link"/>
4004                 </fields>
4005                 <links>
4006                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4007                 </links>
4008         </class>
4009         <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">
4010                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4011                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4012                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4013                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4014                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4015                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4016                 </fields>
4017                 <links>
4018                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4019                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4020                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4021                 </links>
4022         </class>
4023         <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">
4024                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4025                         <field name="field" reporter:datatype="link"/>
4026                         <field name="id" reporter:datatype="id" />
4027                         <field name="source" reporter:datatype="link"/>
4028                         <field name="value" reporter:datatype="text"/>
4029                 </fields>
4030                 <links>
4031                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4032                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4033                 </links>
4034         </class>
4035         <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">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4037                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4038                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4039                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4040                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4041                 </fields>
4042                 <links>
4043                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4044                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4045                 </links>
4046         </class>
4047         <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">
4048                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4049                         <field name="depth" reporter:datatype="int" />
4050                         <field name="grantable" reporter:datatype="bool"/>
4051                         <field name="grp" reporter:datatype="link"/>
4052                         <field name="id" reporter:datatype="id" />
4053                         <field name="perm" reporter:datatype="link"/>
4054                 </fields>
4055                 <links>
4056                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4057                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4058                 </links>
4059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4060             <actions>
4061                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4062                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4063                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4064                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4065             </actions>
4066         </permacrud>
4067         </class>
4068         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4069                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4070                         <field name="items" oils_persist:virtual="true" />
4071                         <field name="btype" reporter:datatype="text"/>
4072                         <field name="id" reporter:datatype="id" />
4073                         <field name="name" reporter:datatype="text"/>
4074                         <field name="owner" reporter:datatype="link"/>
4075                         <field name="pub" reporter:datatype="bool"/>
4076                         <field name="create_time" reporter:datatype="timestamp" />
4077                 </fields>
4078                 <links>
4079                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4080                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4081                 </links>
4082         </class>
4083         <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">
4084                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4085                         <field name="id" reporter:datatype="id" />
4086                         <field name="bucket" reporter:datatype="link"/>
4087                         <field name="note" reporter:datatype="text" />
4088                 </fields>
4089                 <links>
4090                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4091                 </links>
4092         </class>
4093         <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">
4094                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4095                         <field name="id" reporter:datatype="int" />
4096                         <field name="usr" reporter:datatype="link"/>
4097                         <field name="work_ou" reporter:datatype="link"/>
4098                 </fields>
4099                 <links>
4100                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4101                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4102                 </links>
4103         </class>
4104         <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">
4105                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4106                         <field name="depth" reporter:datatype="int"/>
4107                         <field name="grantable" reporter:datatype="bool"/>
4108                         <field name="id" reporter:datatype="id" />
4109                         <field name="perm" reporter:datatype="link"/>
4110                         <field name="usr" reporter:datatype="link"/>
4111                 </fields>
4112                 <links>
4113                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4114                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4115                 </links>
4116         </class>
4117         <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">
4118                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4119                         <field name="object_id" reporter:datatype="text"/>
4120                         <field name="grantable" reporter:datatype="bool"/>
4121                         <field name="id" reporter:datatype="id" />
4122                         <field name="perm" reporter:datatype="link"/>
4123                         <field name="usr" reporter:datatype="link"/>
4124                         <field name="object_type" reporter:datatype="text"/>
4125                 </fields>
4126                 <links>
4127                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4128                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4129                 </links>
4130         </class>
4131         <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">
4132                 <fields oils_persist:primary="id" oils_persist:sequence="">
4133                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4134                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4135                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4136                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4137                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4138                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4139                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4140                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4141                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4142                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4144                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4145                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4146                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4147                 </fields>
4148                 <links>
4149                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4150                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4151                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4152                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4153                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4154                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4155                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4156                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4157                 </links>
4158         </class>
4159         <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">
4160                 <fields oils_persist:primary="id" oils_persist:sequence="">
4161                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4162                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4163                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4164                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4165                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4166                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4167                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4168                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4169                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4170                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4171                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4172                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4173                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4174                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4175                 </fields>
4176                 <links>
4177                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4178                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4179                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4180                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4181                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4182                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4183                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4184                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4185                 </links>
4186         </class>
4187         <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">
4188                 <fields oils_persist:primary="id" oils_persist:sequence="">
4189                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4190                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4191                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4192                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4193                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4194                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4195                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4196                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4198                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4199                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4200                 </fields>
4201                 <links>
4202                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4203                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4204                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4205                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4206                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4207                 </links>
4208         </class>
4209         <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">
4210                 <fields oils_persist:primary="id" oils_persist:sequence="">
4211                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4212                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4213                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4214                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4215                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4216                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4217                         <field reporter:label="Accepting User" name="accepting_usr" />
4218                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4219                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4220                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4221                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4222                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4223                 </fields>
4224                 <links>
4225                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4226                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4227                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4228                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4229                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4230                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4231                 </links>
4232         </class>
4233         <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">
4234                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4235                         <field name="bucket" reporter:datatype="link"/>
4236                         <field name="id" reporter:datatype="id" />
4237                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4238                         <field name="create_time" reporter:datatype="timestamp" />
4239                         <field name="pos" reporter:datatype="int" />
4240                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4241                 </fields>
4242                 <links>
4243                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4244                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4245             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4246                 </links>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4250                         <field name="id" reporter:datatype="id" />
4251                         <field name="item" reporter:datatype="link"/>
4252                         <field name="note" reporter:datatype="text" />
4253                 </fields>
4254                 <links>
4255                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4256                 </links>
4257         </class>
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4260                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4261                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4262                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4263                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4264                 </fields>
4265                 <links>
4266                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4267                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4268                 </links>
4269         </class>
4270
4271         <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">
4272                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4273                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4274                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4275                 </fields>
4276                 <links/>
4277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4278             <actions>
4279                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4280                 <retrieve/>
4281                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4282                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4283             </actions>
4284         </permacrud>
4285         </class>
4286
4287
4288         <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">
4289                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4290                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4291                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4292                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4293                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4294                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4295                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4296                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4297                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4298                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4299                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4300                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4301                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4302                 </fields>
4303                 <links>
4304                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4305                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4306                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4307                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4308                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4309                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4310                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4311                 </links>
4312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4313             <actions>
4314                 <create permission="TRANSIT_COPY">
4315                     <context link="target_copy" field="owner"/>
4316                 </create>
4317                 <retrieve/>
4318                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4319                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4320             </actions>
4321         </permacrud>
4322         </class>
4323         <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">
4324                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4325                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4326                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4327                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4328                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4329                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4330                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4331                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4332                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4333                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4334                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4335                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4336                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4337                 </fields>
4338                 <links>
4339                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4340                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4341                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4342                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4343                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4344                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4345                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4346                 </links>
4347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4348             <actions>
4349                 <create permission="TRANSIT_COPY" context_field="owner">
4350                     <context link="target_copy" field="circ_lib"/>
4351                 </create>
4352                 <retrieve/>
4353                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4354                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4355             </actions>
4356         </permacrud>
4357         </class>
4358         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4359                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4360                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4361                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4362                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4363                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4364                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4365                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4366                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4367                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4368                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4369                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4370                 </fields>
4371                 <links>
4372                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4373                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4374                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4375                 </links>
4376         </class>
4377         <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">
4378                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4379                         <field name="grp" />
4380                         <field name="id" reporter:datatype="id" />
4381                         <field name="usr" />
4382                 </fields>
4383                 <links>
4384                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4385                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4386                 </links>
4387         </class>
4388         <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">
4389                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4390                         <field name="id" reporter:datatype="id" />
4391                         <field name="fq_field" reporter:datatype="text"/>
4392                         <field name="identity_value" reporter:datatype="text"/>
4393                         <field name="translation" reporter:datatype="text"/>
4394                         <field name="string" reporter:datatype="text"/>
4395                 </fields>
4396                 <links>
4397                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4398                 </links>
4399         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4400             <actions>
4401                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4402                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4403                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4404                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4405             </actions>
4406         </permacrud>
4407         </class>
4408         <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">
4409                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4410                         <field name="id" reporter:datatype="id" />
4411                         <field name="fm_class" reporter:datatype="text"/>
4412                         <field name="field" reporter:datatype="text"/>
4413                         <field name="owner" reporter:datatype="org_unit"/>
4414                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4415                 </fields>
4416                 <links>
4417                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4418                 </links>
4419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4420             <actions>
4421                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4422                 <retrieve/>
4423                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4424                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4425             </actions>
4426         </permacrud>
4427         </class>
4428         <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">
4429                 <fields oils_persist:primary="code">
4430                         <field name="code" reporter:datatype="id" />
4431                         <field name="marc_code" reporter:datatype="text"/>
4432                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4433                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4434                 </fields>
4435                 <links/>
4436         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4437             <actions>
4438                 <create permission="CREATE_LOCALE" global_required="true"/>
4439                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4440                 <update permission="UPDATE_LOCALE" global_required="true"/>
4441                 <delete permission="DELETE_LOCALE" global_required="true"/>
4442             </actions>
4443         </permacrud>
4444         </class>
4445         <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">
4446                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4447                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4448                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4449                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4450             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4451                 </fields>
4452                 <links>
4453                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4454                 </links>
4455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4456             <actions>
4457                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4458                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4459                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4460                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4461             </actions>
4462         </permacrud>
4463         </class>
4464
4465         <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">
4466                 <fields oils_persist:primary="id">
4467                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4468                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4469                 </fields>
4470                 <links/>
4471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4472             <actions>
4473                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4474                 <retrieve/>
4475                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4476                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4477             </actions>
4478         </permacrud>
4479         </class>
4480
4481         <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">
4482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
4483                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4484                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4485                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4486                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4487                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4488                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4489                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4490                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4491                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4492                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4493                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4494                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4495                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4496                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4497                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4498                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4499                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4500                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4501                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4502                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4503                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4504                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4505                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4506                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4507                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4508                 </fields>
4509                 <links>
4510                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4511                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4512                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4513                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4514                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4515                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
4516                 </links>
4517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4518             <actions>
4519                 <create permission="user_request.create">
4520                     <context link="usr" field="home_ou"/>
4521                                 </create>
4522                 <retrieve permission="user_request.view">
4523                     <context link="usr" field="home_ou"/>
4524                                 </retrieve>
4525                 <update permission="user_request.update">
4526                     <context link="usr" field="home_ou"/>
4527                                 </update>
4528                 <delete permission="user_request.delete">
4529                     <context link="usr" field="home_ou"/>
4530                                 </delete>
4531             </actions>
4532         </permacrud>
4533         </class>
4534
4535         <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">
4536                 <fields oils_persist:primary="code">
4537                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4538                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4539                 </fields>
4540                 <links/>
4541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4542             <actions>
4543                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4544                 <retrieve/>
4545                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4546                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4547             </actions>
4548         </permacrud>
4549         </class>
4550
4551         <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">
4552                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4553                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4554                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4555                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4556                         <field reporter:label="Ratio" name="ratio" />
4557                 </fields>
4558                 <links>
4559                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4560                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4561                 </links>
4562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4563                         <actions>
4564                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4565                                 <retrieve/>
4566                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4567                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4568                         </actions>
4569                 </permacrud>
4570         </class>
4571
4572         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4574                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4575                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4576                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4577                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4578                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4579                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4580                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4581                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4582                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4583                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4584                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4585                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4586                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4587                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4588                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4589                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
4590                 </fields>
4591                 <links>
4592                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4593                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4594             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4595             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4596             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
4597                 </links>
4598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4599             <actions>
4600                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4601                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4602                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4603                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4604             </actions>
4605         </permacrud>
4606         </class>
4607
4608         <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">
4609                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4610                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4611                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4612                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4613                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4614                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4615                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4616                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4617                 </fields>
4618                 <links>
4619                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4620                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4621                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4622                 </links>
4623         </class>
4624
4625         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4627                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4628                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4629                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4630                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4631                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4632                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
4633                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
4634                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4635                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
4636                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
4637                 </fields>
4638                 <links>
4639                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4640                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4641                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4642                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
4643                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
4644                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
4645                 </links>
4646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4647             <actions>
4648                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
4649                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
4650                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
4651                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
4652             </actions>
4653         </permacrud>
4654         </class>
4655
4656         <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">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
4658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4659                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4660                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4661                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
4662                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
4663                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
4664                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4665                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
4666                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4667                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4668                 </fields>
4669                 <links>
4670                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4671                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4672                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4673                 </links>
4674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4675             <actions>
4676                 <create   permission="ADMIN_INVOICE">
4677                                         <context link="invoice" field="receiver"/>
4678                                 </create>
4679                 <retrieve permission="ADMIN_INVOICE">
4680                                         <context link="invoice" field="receiver"/>
4681                                 </retrieve>
4682                 <update   permission="ADMIN_INVOICE">
4683                                         <context link="invoice" field="receiver"/>
4684                                 </update>
4685                                 <delete   permission="ADMIN_INVOICE">
4686                                         <context link="invoice" field="receiver"/>
4687                                 </delete>
4688             </actions>
4689         </permacrud>
4690         </class>
4691
4692         <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">
4693                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
4694                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4695                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4696                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4697                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
4698                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
4699                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
4700                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4701                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4702                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4703                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4704                 </fields>
4705                 <links>
4706                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4707                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4708                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4709                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
4710                 </links>
4711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4712             <actions>
4713                 <create   permission="ADMIN_INVOICE">
4714                                         <context link="invoice" field="receiver"/>
4715                                 </create>
4716                 <retrieve permission="ADMIN_INVOICE">
4717                                         <context link="invoice" field="receiver"/>
4718                                 </retrieve>
4719                 <update   permission="ADMIN_INVOICE">
4720                                         <context link="invoice" field="receiver"/>
4721                                 </update>
4722                                 <delete   permission="ADMIN_INVOICE">
4723                                         <context link="invoice" field="receiver"/>
4724                                 </delete>
4725             </actions>
4726         </permacrud>
4727         </class>
4728
4729         <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">
4730                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4731                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4732                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4733                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4734                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4735                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4736                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4737                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4738                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4739                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4740                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4741                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4742                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4743                 </fields>
4744                 <links>
4745                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4746                 </links>
4747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4748             <actions>
4749                 <create permission="ADMIN_PROVIDER">
4750                     <context link="provider" field="owner"/>
4751                 </create>
4752                 <retrieve permission="ADMIN_PROVIDER">
4753                     <context link="provider" field="owner"/>
4754                 </retrieve>
4755                 <update permission="ADMIN_PROVIDER">
4756                     <context link="provider" field="owner"/>
4757                 </update>
4758                 <delete permission="ADMIN_PROVIDER">
4759                     <context link="provider" field="owner"/>
4760                 </delete>
4761             </actions>
4762         </permacrud>
4763         </class>
4764
4765         <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">
4766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4768                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4769                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4770                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4771                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4772                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4773         </fields>
4774                 <links>
4775                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4776                 </links>
4777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4778             <actions>
4779                 <create permission="ADMIN_PROVIDER">
4780                     <context link="provider" field="owner"/>
4781                 </create>
4782                 <retrieve permission="ADMIN_PROVIDER">
4783                     <context link="provider" field="owner"/>
4784                 </retrieve>
4785                 <update permission="ADMIN_PROVIDER">
4786                     <context link="provider" field="owner"/>
4787                 </update>
4788                 <delete permission="ADMIN_PROVIDER">
4789                     <context link="provider" field="owner"/>
4790                 </delete>
4791             </actions>
4792         </permacrud>
4793     </class>
4794         <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">
4795                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4796                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4797                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4798                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4799                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4800                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4801                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4802                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4803                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4804                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4805                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4806                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4807                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4808                 </fields>
4809                 <links>
4810                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4811                 </links>
4812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4813             <actions>
4814                 <create permission="ADMIN_PROVIDER">
4815                     <context link="contact" jump='provider' field="owner"/>
4816                 </create>
4817                 <retrieve permission="ADMIN_PROVIDER">
4818                     <context link="contact" jump='provider' field="owner"/>
4819                 </retrieve>
4820                 <update permission="ADMIN_PROVIDER">
4821                     <context link="contact" jump='provider' field="owner"/>
4822                 </update>
4823                 <delete permission="ADMIN_PROVIDER">
4824                     <context link="contact" jump='provider' field="owner"/>
4825                 </delete>
4826             </actions>
4827         </permacrud>
4828         </class>
4829
4830         <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">
4831                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
4832                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
4833                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
4834                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
4835                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
4836                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
4837                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
4838                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
4839                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4840                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
4841                 </fields>
4842                 <links>
4843                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
4844                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
4845                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
4846                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
4847                 </links>
4848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4849                 </permacrud>
4850         </class>
4851
4852         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4854                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4855                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4856                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4857                 </fields>
4858                 <links>
4859             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4860                 </links>
4861                 <!--
4862                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4863                         But here's what it should look like if we ever do use pcrud.
4864                 -->
4865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4866                         <actions>
4867                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4868                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4869                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4870                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4871                         </actions>
4872                 </permacrud>
4873         </class>
4874
4875         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4876                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4877                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4878                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4879                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4880                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4881                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4882                 </fields>
4883                 <links>
4884                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4885                 </links>
4886                 <!--
4887                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4888                         But here's what it should look like if we ever do use pcrud.
4889                 -->
4890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4891                         <actions>
4892                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4893                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4894                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4895                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4896                         </actions>
4897                 </permacrud>
4898         </class>
4899
4900         <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">
4901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4902                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4903                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4904                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4905                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4906                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4907                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4908                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4909                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4910                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4911                 </fields>
4912                 <links>
4913                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4915             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4916             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4917                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4918                 </links>
4919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4920             <actions>
4921                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4922                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4923                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4924                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4925             </actions>
4926         </permacrud>
4927         </class>
4928
4929         <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">
4930                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4931                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4932                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4933                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4934                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4935                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
4936                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
4937                 </fields>
4938                 <links>
4939                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4940                 </links>
4941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4942                         <actions>
4943                                 <create permission="ADMIN_FUNDING_SOURCE">
4944                     <context link="funding_source" field="owner"/>
4945                 </create>
4946                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
4947                     <context link="funding_source" field="owner"/>
4948                 </retrieve>
4949                                 <update permission="ADMIN_FUNDING_SOURCE">
4950                     <context link="funding_source" field="owner"/>
4951                 </update>
4952                                 <delete permission="ADMIN_FUNDING_SOURCE">
4953                     <context link="funding_source" field="owner"/>
4954                 </delete>
4955                         </actions>
4956                 </permacrud>
4957         </class>
4958
4959         <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">
4960                 <fields oils_persist:primary="id">
4961                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
4962                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
4963                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
4964                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
4965                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
4966                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4967                 </fields>
4968                 <links>
4969                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4970                 </links>
4971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4972                 </permacrud>
4973         </class>
4974
4975         <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">
4976                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4977                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4978                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4979                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4980                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4981                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4982                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
4983                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4984                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4985                 </fields>
4986                 <links>
4987                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4988                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4989                 </links>
4990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4991                         <actions>
4992                                 <create permission="ADMIN_ACQ_FUND">
4993                     <context link="fund" field="org"/>
4994                 </create>
4995                                 <retrieve permission="ADMIN_ACQ_FUND">
4996                     <context link="fund" field="org"/>
4997                 </retrieve>
4998                                 <update permission="ADMIN_ACQ_FUND">
4999                     <context link="fund" field="org"/>
5000                 </update>
5001                                 <delete permission="ADMIN_ACQ_FUND">
5002                     <context link="fund" field="org"/>
5003                 </delete>
5004                         </actions>
5005                 </permacrud>
5006         </class>
5007
5008         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5009                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5010                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5011                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5012                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5013                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5014                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5015                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5016                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5017                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5018                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5019                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5020                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5021                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5022                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5023                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5024                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5025                 </fields>
5026                 <links>
5027                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5028                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5029             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5030             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5031             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5032                 </links>
5033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5034             <actions>
5035                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5036                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5037                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5038                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5039             </actions>
5040         </permacrud>
5041         </class>
5042
5043         <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">
5044                 <fields oils_persist:primary="fund">
5045                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5046                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5047                 </fields>
5048                 <links>
5049                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5050                 </links>
5051         </class>
5052
5053         <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">
5054                 <fields oils_persist:primary="fund">
5055                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5056                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5057                 </fields>
5058                 <links>
5059                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5060                 </links>
5061         </class>
5062
5063         <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">
5064                 <fields oils_persist:primary="fund">
5065                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5066                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5067                 </fields>
5068                 <links>
5069                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5070                 </links>
5071         </class>
5072
5073         <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">
5074                 <fields oils_persist:primary="fund">
5075                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5076                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5077                 </fields>
5078                 <links>
5079                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5080                 </links>
5081         </class>
5082
5083         <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">
5084                 <fields oils_persist:primary="fund">
5085                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5086                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5087                 </fields>
5088                 <links>
5089                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5090                 </links>
5091         </class>
5092
5093    <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">
5094         <fields oils_persist:primary="fund">
5095             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5096             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5097         </fields>
5098         <links>
5099             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5100         </links>
5101     </class>
5102
5103    <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">
5104         <fields oils_persist:primary="fund">
5105             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5106             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5107         </fields>
5108         <links>
5109             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5110         </links>
5111     </class>
5112
5113    <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">
5114         <fields oils_persist:primary="fund">
5115             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5116             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5117         </fields>
5118         <links>
5119             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5120         </links>
5121     </class>
5122
5123    <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">
5124         <fields oils_persist:primary="fund">
5125             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5126             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
5127         </fields>
5128         <links>
5129             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5130         </links>
5131     </class>
5132
5133    <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">
5134         <fields oils_persist:primary="fund">
5135             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5136             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5137         </fields>
5138         <links>
5139             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5140         </links>
5141     </class>
5142
5143         <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">
5144                 <fields oils_persist:primary="funding_source">
5145                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5146                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5147                 </fields>
5148                 <links>
5149                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5150                 </links>
5151         </class>
5152
5153         <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">
5154                 <fields oils_persist:primary="funding_source">
5155                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5156                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5157                 </fields>
5158                 <links>
5159                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5160                 </links>
5161         </class>
5162
5163         <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">
5164                 <fields oils_persist:primary="funding_source">
5165                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5166                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5167                 </fields>
5168                 <links>
5169                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5170                 </links>
5171         </class>
5172
5173         <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">
5174                 <fields oils_persist:primary="fund">
5175                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5176                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5177                 </fields>
5178                 <links>
5179                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5180                 </links>
5181         </class>
5182
5183         <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">
5184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5185                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5186                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5187                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5188                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5189                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5190                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5191                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5192                 </fields>
5193                 <links>
5194                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5195                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5196                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5197                 </links>
5198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5199                         <actions>
5200                                 <create permission="ADMIN_ACQ_FUND">
5201                     <context link="fund" field="org"/>
5202                 </create>
5203                                 <retrieve permission="ADMIN_ACQ_FUND">
5204                     <context link="fund" field="org"/>
5205                 </retrieve>
5206                                 <update permission="ADMIN_ACQ_FUND">
5207                     <context link="fund" field="org"/>
5208                 </update>
5209                                 <delete permission="ADMIN_ACQ_FUND">
5210                     <context link="fund" field="org"/>
5211                 </delete>
5212                         </actions>
5213                 </permacrud>
5214         </class>
5215
5216     <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">
5217         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5218             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5219             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5220             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5221             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5222             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5223             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5224             <field reporter:label="Note" name="note" reporter:datatype="text" />
5225             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5226         </fields>
5227         <links>
5228             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5229             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5230             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5231         </links>
5232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5233                         <actions>
5234                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5235                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5236                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5237                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5238                         </actions>
5239                 </permacrud>
5240     </class>
5241
5242         <class id="acqpl" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
5243                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5244                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
5245                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5246                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
5247                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5248                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5249                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5250                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5251                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5252                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5253                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5254                 </fields>
5255                 <links>
5256                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5257                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5258                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5259                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5260                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5261                 </links>
5262         </class>
5263
5264         <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">
5265                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5266                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5267                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5268                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5269                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5270                 </fields>
5271                 <links>
5272                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5273                 </links>
5274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5275                         <actions>
5276                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5277                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5278                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5279                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5280                         </actions>
5281                 </permacrud>
5282         </class>
5283
5284         <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">
5285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5286                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
5287                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5288                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5289                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5290                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5291                         <field reporter:label="State" name="state" reporter:datatype="text" />
5292                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5293                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5294                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5295                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5296                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5297                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5298                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5299                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5300                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5301                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
5302                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5303                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5304                 </fields>
5305                 <links>
5306                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5307                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5308                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5309                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5310                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5311                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5312                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5313                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5314                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5315                 </links>
5316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5317                         <actions>
5318                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5319                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5320                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5321                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5322                         </actions>
5323                 </permacrud>
5324         </class>
5325
5326         <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">
5327                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5328                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5329                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5330                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5331                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5332                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5333                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5334                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5335                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5336                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5337                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5338                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5339                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5340                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5341                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5342                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5343                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5344                 </fields>
5345                 <links>
5346                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5347                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5348                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5349                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5350                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5351                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5352                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5353                 </links>
5354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5355             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5356                 </permacrud>
5357         </class>
5358
5359         <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">
5360                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5361                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5362                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5363                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5364                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5365                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5366                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5367                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5368                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5369                 </fields>
5370                 <links>
5371                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5372                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5373                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5374                 </links>
5375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5376             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5377                 <context link="purchase_order" field="ordering_agency"/>
5378             </retrieve>
5379             <create permission="CREATE_PURCHASE_ORDER">
5380                 <context link="purchase_order" field="ordering_agency"/>
5381             </create>
5382             <update permission="CREATE_PURCHASE_ORDER">
5383                 <context link="purchase_order" field="ordering_agency"/>
5384             </update>
5385             <delete permission="CREATE_PURCHASE_ORDER">
5386                 <context link="purchase_order" field="ordering_agency"/>
5387             </delete>
5388                 </permacrud>
5389         </class>
5390
5391         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5392                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5393                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5394                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5395                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
5396                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5397                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5398                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5399                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5400                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5401                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5402                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5403                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5404                         <field reporter:label="State" name="state" reporter:datatype="text" />
5405                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5406                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5407                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
5408                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5409                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5410                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5411                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5412                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5413                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5414                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
5415                 </fields>
5416                 <links>
5417                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5418                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5419                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5420                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5421                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5422                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5423                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5424                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5425                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5426                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5427                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5428                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
5429                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5430                 </links>
5431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5432             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5433                 <context link="purchase_order" field="ordering_agency"/>
5434                 <context link="picklist" field="org_unit"/>
5435             </retrieve>
5436                 </permacrud>
5437         </class>
5438
5439         <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">
5440                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5441                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5442                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5443                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5444                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5445                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5446                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5447                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5448                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5449                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5450                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link"/>
5451                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5452                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5453                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5454                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5455                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5456                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5457                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5458                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5459                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
5460                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5461                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5462                 </fields>
5463                 <links>
5464                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5465                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5466                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5467                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5468                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5469                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5470                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5471                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5472                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5473                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5474                 </links>
5475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5476             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5477                 <context link="purchase_order" field="ordering_agency"/>
5478                 <context link="picklist" field="org_unit"/>
5479             </retrieve>
5480                 </permacrud>
5481         </class>
5482
5483         <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">
5484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5485                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5486                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5487                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5488                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5489                 </fields>
5490                 <links>
5491                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5492                 </links>
5493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5494                         <actions>
5495                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5496                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5497                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5498                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5499                         </actions>
5500                 </permacrud>
5501         </class>
5502
5503         <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">
5504                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5505                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5506                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5507                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5508                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5509                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5510                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5511                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5512                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5513                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5514                 </fields>
5515                 <links>
5516                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5517                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5518                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5519                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5520                 </links>
5521         </class>
5522
5523         <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">
5524                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5525                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5526                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5527                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5528                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5529                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5530                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5531                 </fields>
5532                 <links>
5533                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5534                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5535                 </links>
5536         </class>
5537
5538         <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">
5539                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5540                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5541                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5542                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5543                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5544                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5545                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5546                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5547                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5548                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5549                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5550                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5551                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5552                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5553                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5554                 </fields>
5555                 <links>
5556                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5557                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5558                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5559                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5560                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5561                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5562                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5563                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5564                 </links>
5565         </class>
5566
5567         <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">
5568                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5569                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5570                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5571                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5572                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5573                 </fields>
5574                 <links/>
5575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5576                         <actions>
5577                                 <retrieve />
5578                         </actions>
5579                 </permacrud>
5580         </class>
5581
5582         <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">
5583                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5584                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5585                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5586                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5587                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5588                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5589             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5590                 </fields>
5591                 <links/>
5592         <permacrud>
5593             <actions>
5594                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5595                 <retrieve />
5596                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5597                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5598             </actions>
5599         </permacrud>
5600         </class>
5601
5602         <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">
5603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5604                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5605                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5606                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5607                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5608                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5609                 </fields>
5610                 <links/>
5611         </class>
5612         <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">
5613                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5614                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5615                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5616                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5617                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5618                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5619                 </fields>
5620                 <links>
5621                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5622                 </links>
5623         </class>
5624
5625         <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">
5626             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5627                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5628                 <field reporter:label="Code" name="code" reporter:datatype="text" />
5629                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5630                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5631                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5632                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5633         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5634
5635             </fields>
5636             <links>
5637                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5638             </links>
5639             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5640                 <actions>
5641                     <create permission="ADMIN_PROVIDER">
5642                         <context link="provider" field="owner"/>
5643                     </create>
5644                     <retrieve permission="ADMIN_PROVIDER">
5645                         <context link="provider" field="owner"/>
5646                     </retrieve>
5647                     <update permission="ADMIN_PROVIDER">
5648                         <context link="provider" field="owner"/>
5649                     </update>
5650                     <delete permission="ADMIN_PROVIDER">
5651                         <context link="provider" field="owner"/>
5652                     </delete>
5653                 </actions>
5654             </permacrud>
5655         </class>
5656         
5657         <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">
5658             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
5659                 <field reporter:label="ID" name="id" reporter:datatype="id" />
5660                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5661                 <field reporter:label="Name" name="name" reporter:datatype="text" />
5662                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
5663             </fields>
5664             <links>
5665                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5666             </links>
5667             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5668                 <actions>
5669                     <create permission="ADMIN_PROVIDER">
5670                         <context link="provider" field="owner"/>
5671                     </create>
5672                     <retrieve permission="ADMIN_PROVIDER">
5673                         <context link="provider" field="owner"/>
5674                     </retrieve>
5675                     <update permission="ADMIN_PROVIDER">
5676                         <context link="provider" field="owner"/>
5677                     </update>
5678                     <delete permission="ADMIN_PROVIDER">
5679                         <context link="provider" field="owner"/>
5680                     </delete>
5681                 </actions>
5682             </permacrud>
5683         </class>
5684         
5685         <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">
5686             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5687                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5688                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5689                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5690                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5691                 </fields>
5692                 <links/>
5693         </class>
5694
5695         <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">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
5697                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID"/>
5698                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
5699                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
5700                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
5701                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
5702                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
5703                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
5704                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
5705                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
5706                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
5707                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
5708                 </fields>
5709                 <links>
5710                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5711                 </links>
5712         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5713             <actions>
5714                 <create permission="ADMIN_PROVIDER">
5715                     <context link="provider" field="owner"/>
5716                 </create>
5717                 <retrieve permission="ADMIN_PROVIDER">
5718                     <context link="provider" field="owner"/>
5719                 </retrieve>
5720                 <update permission="ADMIN_PROVIDER">
5721                     <context link="provider" field="owner"/>
5722                 </update>
5723                 <delete permission="ADMIN_PROVIDER">
5724                     <context link="provider" field="owner"/>
5725                 </delete>
5726             </actions>
5727         </permacrud>
5728         </class>
5729
5730         <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">
5731                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
5732                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
5733                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
5734                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
5735                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
5736                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
5737                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
5738                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
5739                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
5740                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
5741                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
5742                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
5743                 </fields>
5744                 <links>
5745                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
5746                 </links>
5747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5748             <actions>
5749                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5750                     <context link="account" jump="provider" field="owner"/>
5751                 </retrieve>
5752                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5753                     <context link="account" jump="provider" field="owner"/>
5754                 </update>
5755                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5756                     <context link="account" jump="provider" field="owner"/>
5757                 </delete>
5758             </actions>
5759         </permacrud>
5760         </class>
5761
5762
5763         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
5764                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
5765                         <field name="id" reporter:datatype="id" />
5766                         <field name="parent" reporter:datatype="link"/>
5767                         <field name="owner" reporter:datatype="link"/>
5768                         <field name="create_time" reporter:datatype="timestamp"/>
5769                         <field name="name" reporter:datatype="text"/>
5770                         <field name="shared" reporter:datatype="bool"/>
5771                         <field name="share_with" reporter:datatype="link"/>
5772                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5773                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
5774                 </fields>
5775                 <links>
5776                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5777                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
5778                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
5779                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5780                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
5781                 </links>
5782         </class>
5783         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
5784                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
5785                         <field name="id" reporter:datatype="id" />
5786                         <field name="parent" reporter:datatype="link"/>
5787                         <field name="owner" reporter:datatype="link"/>
5788                         <field name="create_time" reporter:datatype="timestamp"/>
5789                         <field name="name" reporter:datatype="text"/>
5790                         <field name="shared" reporter:datatype="bool"/>
5791                         <field name="share_with" reporter:datatype="link"/>
5792                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5793                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
5794                 </fields>
5795                 <links>
5796                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5797                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
5798                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
5799                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5800                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
5801                 </links>
5802         </class>
5803         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
5804                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
5805                         <field name="id" reporter:datatype="id" />
5806                         <field name="parent" reporter:datatype="link"/>
5807                         <field name="owner" reporter:datatype="link"/>
5808                         <field name="create_time" reporter:datatype="timestamp"/>
5809                         <field name="name" reporter:datatype="text"/>
5810                         <field name="shared" reporter:datatype="bool"/>
5811                         <field name="share_with" reporter:datatype="link"/>
5812                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5813                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5814                 </fields>
5815                 <links>
5816                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5817                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
5818                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
5819                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5820                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
5821                 </links>
5822         </class>
5823         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
5824                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
5825                         <field name="id" reporter:datatype="id" />
5826                         <field name="owner" reporter:datatype="link"/>
5827                         <field name="create_time" reporter:datatype="timestamp"/>
5828                         <field name="name" reporter:datatype="text"/>
5829                         <field name="data" reporter:datatype="text"/>
5830                         <field name="folder" reporter:datatype="link"/>
5831                         <field name="description" reporter:datatype="text"/>
5832                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5833                 </fields>
5834                 <links>
5835                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5836                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
5837                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
5838                 </links>
5839         </class>
5840         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
5841                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
5842                         <field name="id" reporter:datatype="id" />
5843                         <field name="owner" reporter:datatype="link"/>
5844                         <field name="create_time" reporter:datatype="timestamp"/>
5845                         <field name="template" reporter:datatype="link"/>
5846                         <field name="data" reporter:datatype="link"/>
5847                         <field name="folder" reporter:datatype="link"/>
5848                         <field name="recur" reporter:datatype="bool"/>
5849                         <field name="recurrence" reporter:datatype="interval"/>
5850                         <field name="name" reporter:datatype="text"/>
5851                         <field name="description" reporter:datatype="text"/>
5852                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
5853                 </fields>
5854                 <links>
5855                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5856                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
5857                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
5858                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5859                 </links>
5860         </class>
5861         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5862                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5863                         <field name="id" reporter:datatype="id" />
5864                         <field name="runner" reporter:datatype="link"/>
5865                         <field name="start_time" reporter:datatype="timestamp"/>
5866                         <field name="complete_time" reporter:datatype="timestamp"/>
5867                         <field name="run_time" reporter:datatype="timestamp"/>
5868                         <field name="email" reporter:datatype="text"/>
5869                         <field name="excel_format" reporter:datatype="bool"/>
5870                         <field name="csv_format" reporter:datatype="bool"/>
5871                         <field name="html_format" reporter:datatype="bool"/>
5872                         <field name="error_code" reporter:datatype="int"/>
5873                         <field name="error_text" reporter:datatype="text"/>
5874                         <field name="report" reporter:datatype="link"/>
5875                         <field name="folder" reporter:datatype="link"/>
5876                         <field name="chart_pie" reporter:datatype="bool"/>
5877                         <field name="chart_bar" reporter:datatype="bool"/>
5878                         <field name="chart_line" reporter:datatype="bool"/>
5879                 </fields>
5880                 <links>
5881                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5882                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5883                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5884                 </links>
5885         </class>
5886         <class id="rmsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
5887                 <fields oils_persist:primary="id">
5888                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5889                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5890                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5891                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5892                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5893                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5894                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5895                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5896                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5897                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5898                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5899                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5900                 </fields>
5901                 <links>
5902                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5903                 </links>
5904         </class>
5905         <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">
5906                 <fields oils_persist:primary="id">
5907                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5908                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5909                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5910                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5911                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5912                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5913                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5914                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5915                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5916                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5917                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5918                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5919                 </fields>
5920                 <links>
5921                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5922                 </links>
5923         </class>
5924         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5925                 <fields oils_persist:primary="id">
5926                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5927                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5928                         <field reporter:label="Fingerprint" name="fingerprint" />
5929                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5930                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5931                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5932                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5933                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5934                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5935                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5936                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5937                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5938                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5939                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5940                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5941                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5942                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5943                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5944                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5945                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5946                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5947                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5948                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5949                 </fields>
5950                 <links>
5951                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5952                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5953                 </links>
5954         </class>
5955         <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">
5956                 <fields oils_persist:primary="id">
5957                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5958                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5959                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5960                 </fields>
5961                 <links>
5962                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5963                 </links>
5964         </class>
5965         <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">
5966                 <fields oils_persist:primary="id">
5967                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5968                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5969                 </fields>
5970                 <links>
5971                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5972                 </links>
5973         </class>
5974         <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">
5975                 <fields oils_persist:primary="id">
5976                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5977                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5978                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5979                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5980                 </fields>
5981                 <links>
5982                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5983                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5984                 </links>
5985         </class>
5986         <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">
5987                 <fields oils_persist:primary="xact">
5988                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5989                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5990                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5991                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5992                 </fields>
5993                 <links>
5994                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5995                 </links>
5996         </class>
5997         <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">
5998                 <fields oils_persist:primary="xact">
5999                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6000                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6001                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6002                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6003                 </fields>
6004                 <links>
6005                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6006                 </links>
6007         </class>
6008         <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)">
6009                 <fields oils_persist:primary="id">
6010                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6011                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6012                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6013                 </fields>
6014                 <links>
6015                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6016                 </links>
6017         </class>
6018         <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">
6019                 <fields oils_persist:primary="id">
6020                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6021                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6022                 </fields>
6023                 <links>
6024                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6025                 </links>
6026         </class>
6027         <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">
6028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6029                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6030                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6031                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6032                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6033                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6034                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6035                 </fields>
6036                 <links>
6037                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6038                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6039                 </links>
6040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6041                         <actions>
6042                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6043                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6044                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6045                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6046                         </actions>
6047                 </permacrud>
6048         </class>
6049         <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">
6050                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
6051                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
6052                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
6053                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
6054                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
6055                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6056                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6057                 </fields>
6058                 <links>
6059                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6060                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6061                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6062                 </links>
6063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6064                         <actions>
6065                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
6066                                         <context link="formula" field="owner"/>
6067                                 </create>
6068                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
6069                                         <context link="formula" field="owner"/>
6070                                 </retrieve>
6071                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
6072                                         <context link="formula" field="owner"/>
6073                                 </update>
6074                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
6075                                         <context link="formula" field="owner"/>
6076                                 </delete>
6077                         </actions>
6078                 </permacrud>
6079         </class>
6080
6081         <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">
6082                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
6083                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6084                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6085                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6086                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
6087                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
6088                 </fields>
6089                 <links>
6090                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6091                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6092                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6093                 </links>
6094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6095                         <actions>
6096                                 <create permission="CREATE_PURCHASE_ORDER">
6097                                         <context link="formula" field="owner"/>
6098                 </create>
6099                                 <retrieve permission="CREATE_PURCHASE_ORDER">
6100                                         <context link="formula" field="owner"/>
6101                 </retrieve>
6102                                 <update permission="CREATE_PURCHASE_ORDER">
6103                                         <context link="formula" field="owner"/>
6104                 </update>
6105                                 <delete permission="CREATE_PURCHASE_ORDER">
6106                                         <context link="formula" field="owner"/>
6107                 </delete>
6108                         </actions>
6109                 </permacrud>
6110         </class>
6111
6112         <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">
6113                 <fields oils_persist:primary="id">
6114                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
6115                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6116                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
6117                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
6118                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
6119                 </fields>
6120                 <links>
6121                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6122                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6123                 </links>
6124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6125                 </permacrud>
6126         </class>
6127
6128         <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">
6129                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
6130                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id"/>
6131                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6132                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6133                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6134                 </fields>
6135                 <links>
6136                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6137                 </links>
6138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6139                 </permacrud>
6140         </class>
6141
6142         <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">
6143                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
6144                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id"/>
6145                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6146                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6147                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6148                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
6149                 </fields>
6150                 <links>
6151                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6152                 </links>
6153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6154                 </permacrud>
6155         </class>
6156
6157         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
6158                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
6159                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6160                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6161                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
6162                 </fields>
6163                 <links>
6164                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6165                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
6166                 </links>
6167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6168                 </permacrud>
6169         </class>
6170
6171         <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">
6172                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
6173                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6174                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6175                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6176                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6177                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6178                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6179                 </fields>
6180                 <links>
6181                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6182                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
6183                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6184                 </links>
6185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6186                 </permacrud>
6187         </class>
6188
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
6191                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6192                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6193                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
6194                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6195                 </fields>
6196                 <links>
6197                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6198                 </links>
6199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6200             <actions>
6201                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6202                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
6203                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6204                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6205             </actions>
6206                 </permacrud>
6207         </class>
6208
6209         <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">
6210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
6211                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
6212                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
6213                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
6214                         <field reporter:label="Action" name="action" reporter:datatype="link"/>
6215                 </fields>
6216                 <links>
6217                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6218                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
6219                 </links>
6220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6221                         <actions>
6222                                 <create permission="ADMIN_CLAIM_POLICY">
6223                                         <context link="claim_policy" field="org_unit"/>
6224                 </create>
6225                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
6226                                         <context link="claim_policy" field="org_unit"/>
6227                 </retrieve>
6228                                 <update permission="ADMIN_CLAIM_POLICY">
6229                                         <context link="claim_policy" field="org_unit"/>
6230                 </update>
6231                                 <delete permission="ADMIN_CLAIM_POLICY">
6232                                         <context link="claim_policy" field="org_unit"/>
6233                 </delete>
6234                         </actions>
6235                 </permacrud>
6236         </class>
6237
6238     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
6239         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
6240             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6241             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6242             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6243             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
6244             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6245             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
6246             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
6247             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
6248             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
6249             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
6250             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
6251             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
6252             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
6253             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
6254             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6255         </fields>
6256     </class>
6257
6258     <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">
6259         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
6260             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6261             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6262             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6263             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6264             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6265         </fields>
6266     </class>
6267
6268     <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">
6269         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
6270             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6271             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6272             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6273             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6274             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6275             <field reporter:label="City" name="city" reporter:datatype="text"/>
6276             <field reporter:label="State" name="state" reporter:datatype="text"/>
6277             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6278             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6279             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6280         </fields>
6281     </class>
6282
6283     <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">
6284         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
6285             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6286             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6287             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6288             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6289             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6290             <field reporter:label="City" name="city" reporter:datatype="text"/>
6291             <field reporter:label="State" name="state" reporter:datatype="text"/>
6292             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6293             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6294             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6295         </fields>
6296     </class>
6297
6298     <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">
6299         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6300             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6301             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6302             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6303             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6304             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6305             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6306         </fields>
6307     </class>
6308
6309     <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">
6310         <fields>
6311             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6312             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6313             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6314         </fields>
6315                 <links>
6316                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6317                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6318                 </links>
6319     </class>
6320
6321     <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">
6322         <fields>
6323             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6324             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6325         </fields>
6326                 <links>
6327                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6328                 </links>
6329     </class>
6330
6331     <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">
6332         <fields>
6333             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6334             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6335             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6336         </fields>
6337                 <links>
6338                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6339                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6340                 </links>
6341     </class>
6342
6343     <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">
6344         <fields>
6345             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6346             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6347         </fields>
6348                 <links>
6349                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6350                 </links>
6351     </class>
6352
6353     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6354                 <oils_persist:source_definition>
6355
6356             SELECT  DISTINCT l.*
6357               FROM  action.unfulfilled_hold_loops l
6358                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6359               WHERE l.count = m.max
6360
6361                 </oils_persist:source_definition>
6362         <fields>
6363             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6364             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6365             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6366         </fields>
6367                 <links>
6368                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6369                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6370                 </links>
6371     </class>
6372
6373         <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">
6374                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6375                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6376                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6377                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6378                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6379                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
6380                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
6381                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
6382                 </fields>
6383                 <links>
6384                 </links>
6385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6386                 </permacrud>
6387         </class>
6388
6389         <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">
6390                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6391                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6392                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6393                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6394                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6395                 </fields>
6396                 <links>
6397                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6398                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6399                 </links>
6400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6401                 </permacrud>
6402         </class>
6403
6404         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6405                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6406                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6407                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6408                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6409                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6410                 </fields>
6411                 <links>
6412                 </links>
6413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6414                 </permacrud>
6415         </class>
6416
6417         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6418                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6419                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6420                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6421                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6422                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6423                 </fields>
6424                 <links>
6425                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6426                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6427                 </links>
6428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6429                 </permacrud>
6430         </class>
6431         
6432         <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">
6433                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6434                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6435                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6436                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6437                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6438                 </fields>
6439                 <links>
6440                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
6441                 </links>
6442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6443                 </permacrud>
6444         </class>
6445         
6446         <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">
6447                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6448                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6449                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6450                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6451                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6452                 </fields>
6453                 <links>
6454                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6455                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6456                 </links>
6457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6458                 </permacrud>
6459         </class>
6460
6461         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6462                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6463                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6464                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6465                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6466                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6467                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6468                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6469                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6470                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6471                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6472                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6473                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6474                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6475                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6476                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6477                 </fields>
6478                 <links>
6479                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6480                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6481                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
6482                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6483                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6484                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6485                 </links>
6486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6487                 </permacrud>
6488         </class>
6489
6490         <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">
6491                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6492                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6493                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6494                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6495                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6496                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6497                 </fields>
6498                 <links>
6499                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6500                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
6501                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6502                 </links>
6503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6504                 </permacrud>
6505         </class>
6506
6507         <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">
6508                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6509                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6510                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6511                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6512                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6513                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6514                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6515                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6516                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6517                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6518                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
6519                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
6520                 </fields>
6521                 <links>
6522                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6523                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
6524                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
6525                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
6526                 </links>
6527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528                 </permacrud>
6529         </class>
6530
6531         <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">
6532                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
6533                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
6534                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
6535                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6536                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6537                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
6538                 </fields>
6539                 <links>
6540                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
6541                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
6542                 </links>
6543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6544                 </permacrud>
6545         </class>
6546
6547         <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">
6548                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
6549                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
6550                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6551                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6552                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6553                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
6554                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
6555                 </fields>
6556                 <links>
6557                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6558                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6559                 </links>
6560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6561                 </permacrud>
6562         </class>
6563
6564         <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">
6565                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
6566                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
6567                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6568                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6569                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6570                 </fields>
6571                 <links>
6572                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6573                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6574                 </links>
6575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6576                 </permacrud>
6577         </class>
6578
6579         <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">
6580                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6581                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6582                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6583                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6584                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6585                 </fields>
6586                 <links>
6587                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6588                 </links>
6589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6590                 </permacrud>
6591         </class>
6592
6593         <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">
6594                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6595                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6596                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6597                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6598                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6599                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6600                 </fields>
6601                 <links>
6602                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6603                 </links>
6604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6605                 </permacrud>
6606         </class>
6607
6608         <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">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6610                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6611                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6612                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6613                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6614                 </fields>
6615                 <links>
6616                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6617                 </links>
6618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6619                 </permacrud>
6620         </class>
6621
6622         <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">
6623                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6624                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6625                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6626                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6627                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6628                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6629                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6630                 </fields>
6631                 <links>
6632                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6633                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6634                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6635                 </links>
6636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6637                 </permacrud>
6638         </class>
6639
6640         <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">
6641                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6642                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6643                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6644                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6645                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6646                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6647                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6648                 </fields>
6649                 <links>
6650                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6651                 </links>
6652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6653                 </permacrud>
6654         </class>
6655
6656         <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">
6657                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6658                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6659                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6660                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6661                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6662                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6663                 </fields>
6664                 <links>
6665                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6666                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6667                 </links>
6668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6669                 </permacrud>
6670         </class>
6671
6672         <class id="xfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfld" oils_persist:tablename="query.expr_xfld" reporter:label="Field Expression">
6673                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6674                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6675                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6676                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6677                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6678                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6679                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6680                 </fields>
6681                 <links>
6682                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6683                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6684                 </links>
6685                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6686                 </permacrud>
6687         </class>
6688
6689         <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">
6690                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6691                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6692                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6693                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6694                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6695                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6696                 </fields>
6697                 <links>
6698                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6699                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6700                 </links>
6701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6702                 </permacrud>
6703         </class>
6704
6705         <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">
6706                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6707                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6708                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6709                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6710                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6711                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6712                 </fields>
6713                 <links>
6714                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6715                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6716                 </links>
6717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6718                 </permacrud>
6719         </class>
6720
6721         <class id="xnbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnbet" oils_persist:tablename="query.expr_xnbet" reporter:label="Not Between Expression">
6722                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6723                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6724                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6725                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6726                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6727                 </fields>
6728                 <links>
6729                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6730                 </links>
6731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6732                 </permacrud>
6733         </class>
6734
6735         <class id="xnex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnex" oils_persist:tablename="query.expr_xnex" reporter:label="Not Exists Expression">
6736                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6737                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6738                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6739                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6740                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6741                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6742                 </fields>
6743                 <links>
6744                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6745                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6746                 </links>
6747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6748                 </permacrud>
6749         </class>
6750
6751         <class id="xnin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnin" oils_persist:tablename="query.expr_xnin" reporter:label="Not In Expression">
6752                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6753                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6754                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6755                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6756                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6757                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6758                 </fields>
6759                 <links>
6760                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6761                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6762                 </links>
6763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6764                 </permacrud>
6765         </class>
6766
6767         <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">
6768                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6769                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6770                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6771                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6772                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6773                 </fields>
6774                 <links>
6775                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6776                 </links>
6777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6778                 </permacrud>
6779         </class>
6780
6781         <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">
6782                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6783                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6784                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6785                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6786                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6787                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6788                 </fields>
6789                 <links>
6790                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6791                 </links>
6792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6793                 </permacrud>
6794         </class>
6795
6796         <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">
6797                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6798                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6799                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6800                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6801                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6802                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6803                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6804                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6805                 </fields>
6806                 <links>
6807                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6808                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6809                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6810                 </links>
6811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6812                 </permacrud>
6813         </class>
6814
6815         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_string" oils_persist:tablename="query.expr_string" reporter:label="String Expression">
6816                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6817                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6818                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6819                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6820                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6821                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6822                 </fields>
6823                 <links>
6824                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6825                 </links>
6826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6827                 </permacrud>
6828         </class>
6829
6830         <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">
6831                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6832                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6833                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6834                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6835                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6836                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6837                 </fields>
6838                 <links>
6839                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6840                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6841                 </links>
6842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6843                 </permacrud>
6844         </class>
6845
6846         <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">
6847                 <fields oils_persist:primary="id">
6848                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
6849                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
6850                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
6851                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
6852                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6853                 </fields>
6854                 <links>
6855                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
6856                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6857                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
6858                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6859                 </links>
6860         </class>
6861
6862         <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">
6863                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
6864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6865                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
6866                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
6867                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
6868                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6869                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6870                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
6871                 </fields>
6872                 <links/>
6873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6874                         <actions>
6875                                 <retrieve/>
6876                         </actions>
6877                 </permacrud>
6878         </class>
6879
6880         <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">
6881                 <fields oils_persist:primary="ptype_key">
6882                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
6883                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6884                 </fields>
6885                 <links/>
6886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6887                         <actions>
6888                                 <retrieve/>
6889                         </actions>
6890                 </permacrud>
6891         </class>
6892
6893         <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">
6894                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
6895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6896                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
6897                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
6898                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6899                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6900                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6901                 </fields>
6902                 <links>
6903                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
6904                 </links>
6905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6906                         <actions>
6907                                 <retrieve/>
6908                         </actions>
6909                 </permacrud>
6910         </class>
6911
6912         <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">
6913                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
6914                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6915                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6916                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
6917                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6918                 </fields>
6919                 <links>
6920                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6921                 </links>
6922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6923                         <actions>
6924                                 <retrieve/>
6925                         </actions>
6926                 </permacrud>
6927         </class>
6928
6929         <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">
6930                 <fields oils_persist:primary="code">
6931                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
6932                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
6933                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
6934                 </fields>
6935                 <links/>
6936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6937                         <actions>
6938                                 <retrieve/>
6939                         </actions>
6940                 </permacrud>
6941         </class>
6942
6943         <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">
6944                 <oils_persist:source_definition>
6945
6946             SELECT  b.id,
6947                     MAX(dcp.edit_date) AS last_delete_date
6948              FROM   biblio.record_entry b
6949                     JOIN asset.call_number cn ON (cn.record = b.id)
6950                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
6951              WHERE  NOT b.deleted
6952              GROUP BY b.id
6953              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
6954
6955                 </oils_persist:source_definition>
6956                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
6957                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
6958                         <field reporter:label="Delete Date/Time" name="copy_delete_date" reporter:datatype="timestamp"/>
6959                 </fields>
6960                 <links>
6961                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6962                 </links>
6963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6964                         <actions>
6965                                 <retrieve/>
6966                         </actions>
6967                 </permacrud>
6968         </class>
6969
6970
6971         <!-- ********************************************************************************************************************* -->
6972         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
6973         <!-- ********************************************************************************************************************* -->
6974         <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">
6975                 <fields oils_persist:primary="id">
6976                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
6977                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
6978                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
6979                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6980                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
6981                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
6982                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6983                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
6984                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
6985                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
6986                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
6987                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
6988                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
6989                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
6990                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6991                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
6992                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
6993                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
6994                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
6995                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
6996                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
6997                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
6998                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
6999                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
7000                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
7001                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
7002                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
7003                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
7004                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
7005                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7006                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7007                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7008                 </fields>
7009                 <links>
7010                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7011                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
7012                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
7013                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
7014                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7015                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
7016                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
7017                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
7018                 </links>
7019         </class>
7020
7021         <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">
7022                 <fields oils_persist:primary="id">
7023                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7024                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7025                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7026                 </fields>
7027                 <links>
7028                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7029                 </links>
7030         </class>
7031
7032         <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">
7033                 <fields oils_persist:primary="id">
7034                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7035                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7036                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7037                 </fields>
7038                 <links>
7039                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7040                 </links>
7041         </class>
7042
7043         <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">
7044                 <fields oils_persist:primary="id">
7045                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7046
7047                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
7048                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
7049                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
7050
7051                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
7052                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
7053                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
7054
7055                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
7056                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
7057
7058                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7059                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7060                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
7061
7062                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
7063                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
7064
7065                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
7066                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
7067                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
7068
7069                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
7070                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
7071                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
7072
7073                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7074                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
7075                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
7076                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
7077
7078                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
7079                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
7080
7081                 </fields>
7082                 <links>
7083                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
7084                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7085                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7086                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7087                 </links>
7088         </class>
7089
7090         <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">
7091                 <oils_persist:source_definition>
7092
7093             SELECT
7094                 po.ordering_agency AS ordering_agency,
7095                 po.id AS purchase_order,
7096                 li.id AS lineitem,
7097                 lid.id AS lineitem_detail,
7098                 cpa.id AS claim_policy_action
7099             FROM
7100                 acq.lineitem_detail lid
7101                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
7102                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
7103                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
7104                 JOIN acq.claim_policy_action cpa ON (
7105                     cpa.claim_policy = cp.id
7106
7107                     -- we only care about claim policy actions whose claim
7108                     -- interval we'd reached or exceeded
7109                     AND (NOW() - cpa.action_interval) &gt; po.order_date
7110
7111                     -- filter out all claim policy actions where claim events
7112                     -- have occurred on or after the action's action_interval
7113                     AND NOT EXISTS (
7114                         SELECT 1
7115                         FROM
7116                             acq.claim_event evt
7117                             JOIN acq.claim claim ON (
7118                                 claim.id = evt.claim
7119                                 AND claim.lineitem_detail = lid.id
7120                             )
7121                         WHERE
7122                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
7123                     )
7124                 )
7125             WHERE
7126                 lid.cancel_reason IS NULL
7127                 AND li.cancel_reason IS NULL -- belt/suspenders
7128                 AND po.cancel_reason IS NULL -- belt/suspenders
7129                 AND lid.recv_time IS NULL
7130                 AND po.state = 'on-order'
7131             ORDER BY 1, 2, 3, 4, 5
7132
7133                 </oils_persist:source_definition>
7134                 <fields>
7135                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7136                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7137                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7138                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7139                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
7140                 </fields>
7141                 <links>
7142                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7143                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7144                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7145                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7146                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
7147                 </links>
7148         </class>
7149
7150
7151         <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">
7152                 <oils_persist:source_definition>
7153
7154                         SELECT  t.*
7155                           FROM  action.transit_copy t
7156                                 JOIN actor.org_unit AS s ON (t.source = s.id)
7157                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
7158                           WHERE s.parent_ou &lt;&gt; d.parent_ou
7159
7160                 </oils_persist:source_definition>
7161                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7162                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
7163                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
7164                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7165                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
7166                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
7167                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
7168                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
7169                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7170                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7171                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7172                 </fields>
7173                 <links>
7174                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
7175                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7176                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7177                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7178                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7179                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
7180                 </links>
7181         </class>
7182
7183     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
7184                 <oils_persist:source_definition>
7185
7186         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
7187                 SELECT
7188                         cp.id as copy,
7189                         COUNT(circ.id),
7190                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7191                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7192                 FROM
7193                         asset.copy cp
7194                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
7195                 GROUP BY 1, 3, 4
7196                 UNION
7197                 SELECT
7198                         cp.id as copy,
7199                         COUNT(circ.id),
7200                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7201                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7202                 FROM
7203                         asset.copy cp
7204                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
7205                 GROUP BY 1, 3, 4
7206                 UNION
7207                 SELECT
7208                         id as copy,
7209                         circ_count,
7210                         -1 AS year,
7211                         false as is_renewal
7212                 FROM
7213                         extend_reporter.legacy_circ_count
7214         )x GROUP BY 1, 3, 4
7215
7216                 </oils_persist:source_definition>
7217         <fields>
7218             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
7219             <field reporter:label="Count" name="count" reporter:datatype="int"/>
7220             <field reporter:label="Year" name="year" reporter:datatype="int"/>
7221             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
7222         </fields>
7223                 <links>
7224                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7225                 </links>
7226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7227                         <actions>
7228                                 <retrieve/>
7229                         </actions>
7230                 </permacrud>
7231     </class>
7232
7233         <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">
7234                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7235                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
7236                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
7237                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
7238                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7239                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
7240                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
7241                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
7242                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
7243                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
7244                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
7245                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
7246                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
7247                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
7248                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
7249                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
7250                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
7251                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
7252                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
7253                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
7254                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
7255                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
7256                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
7257                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
7258                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
7259                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7260                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7261                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7262                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
7263                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
7264                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
7265                 </fields>
7266                 <links>
7267                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7268                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
7269                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
7270                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7271                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
7272                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7273                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7274                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7275                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7276                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7277                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7278                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7279                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
7280                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7281                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7282                 </links>
7283         </class>
7284
7285     <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">
7286         <fields oils_persist:primary="id">
7287             <field reporter:label="Title" name="title" reporter:datatype="text"/>
7288             <field reporter:label="Author" name="author" reporter:datatype="text"/>
7289             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
7290             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7291             <field reporter:label="Price" name="price" reporter:datatype="money"/>
7292             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7293             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
7294             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
7295             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7296             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
7297             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7298             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
7299             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
7300             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
7301             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7302             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7303             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7304             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7305             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
7306             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
7307             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
7308             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
7309             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7310             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
7311             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7312             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
7313             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
7314             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
7315             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
7316             <field reporter:label="Status" name="status" reporter:datatype="link"/>
7317             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
7318             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
7319             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
7320             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
7321         </fields>
7322         <links>
7323             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7324             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7325             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7326             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7327             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7328         </links>
7329     </class>
7330
7331     <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">
7332         <fields oils_persist:primary="id">
7333             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7334             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7335             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7336             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7337         </fields>
7338         <links>
7339             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7340             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7341         </links>
7342     </class>
7343
7344     <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">
7345         <fields oils_persist:primary="owning_lib">
7346             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7347             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7348             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7349         </fields>
7350         <links>
7351             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7352         </links>
7353     </class>
7354
7355     <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">
7356         <fields oils_persist:primary="id">
7357             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7358             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7359             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7360             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7361             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7362         </fields>
7363         <links>
7364             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7365             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7366             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7367         </links>
7368     </class>
7369
7370     <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">
7371         <fields oils_persist:primary="circ_lib">
7372             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7373             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7374             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7375             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7376         </fields>
7377         <links>
7378             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7379             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7380         </links>
7381     </class>
7382
7383     <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">
7384         <fields oils_persist:primary="id">
7385             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7386             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7387             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7388             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7389             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7390         </fields>
7391         <links>
7392             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7393             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7394             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7395         </links>
7396     </class>
7397
7398     <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">
7399         <fields oils_persist:primary="home_ou">
7400             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7401             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7402             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7403             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7404         </fields>
7405         <links>
7406             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7407             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7408         </links>
7409     </class>
7410         <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">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
7412                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
7413                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
7414                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
7415                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7416                 </fields>
7417                 <links>
7418                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7419                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
7420                 </links>
7421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7422                         <actions>
7423                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7424                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
7425                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7426                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7427                         </actions>
7428                 </permacrud>
7429         </class>
7430         <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">
7431                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
7432                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
7433                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
7434                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
7435                 </fields>
7436                 <links>
7437                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7438                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
7439                         </links>
7440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7441                 <actions>
7442                                 <create permission="ADMIN_ACQ_FUND_TAG">
7443                                         <context link="tag" field="owner"/>
7444                                 </create>
7445                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7446                                         <context link="tag" field="owner"/>
7447                                 </retrieve>
7448                                 <update permission="ADMIN_ACQ_FUND_TAG">
7449                                         <context link="tag" field="owner"/>
7450                                 </update>
7451                                 <delete permission="ADMIN_ACQ_FUND_TAG">
7452                                         <context link="tag" field="owner"/>
7453                                 </delete>
7454                         </actions>
7455                 </permacrud>
7456         </class>
7457
7458         <!-- ********************************************************************************************************************* -->
7459
7460 </IDL>
7461
7462 <!--
7463     vim:noet:ts=4:sw=4:
7464 -->