]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Add a cancel_reason column to acq.lineitem_detail, pointing to
[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="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">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
138                 </fields>
139                 <links>
140                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
141                 </links>
142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
143                         <actions>
144                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
145                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
146                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
147                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
148                         </actions>
149                 </permacrud>
150         </class>
151
152         <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">
153                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
154                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
155                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
156                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
157                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
158                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
159                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
160                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
161                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
162                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
163                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
164                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
165                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
166                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
167                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
168                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
169                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
170                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
171                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
172                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
173                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
174                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
175                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
176                 </fields>
177                 <links>
178                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
179                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
180                 </links>
181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
182                         <actions>
183                                 <create permission="CREATE_IMPORT_ITEM">
184                     <context link="definition" field="owner"/>
185                                 </create>
186                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
187                     <context link="definition" field="owner"/>
188                                 </retrieve>
189                                 <update permission="UPDATE_IMPORT_ITEM">
190                     <context link="definition" field="owner"/>
191                                 </update>
192                                 <delete permission="DELETE_IMPORT_ITEM">
193                     <context link="definition" field="owner"/>
194                                 </delete>
195                         </actions>
196                 </permacrud>
197         </class>
198
199         <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">
200                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
201                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
202                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
203                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
204                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
205                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
206                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
207                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
208                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
209                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
210                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
211                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
212                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
213                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
214                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
215                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
216                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
217                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
218                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
219                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
220                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
221                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
222                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
223                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
224                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
225                 </fields>
226                 <links>
227                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
228                 </links>
229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
230                         <actions>
231                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
232                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
233                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
234                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
235                         </actions>
236                 </permacrud>
237         </class>
238
239         <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">
240                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
241                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
242                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
243                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
244                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
245                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
246                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
247                 </fields>
248                 <links>
249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
250                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
255                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
256                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
257                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <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">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
264                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
265                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
266                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
267                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
268                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
269                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
270                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
271                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
272                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
273                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
274                 </fields>
275                 <links>
276                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
277                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
278                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
279             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
280             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
281                 </links>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
285                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
286                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
287                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <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">
293                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
295                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
296                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
297                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
298                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
299                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
300                 </fields>
301                 <links/>
302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
303                         <actions>
304                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
305                 <retrieve/>
306                 <!--
307                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
308                 -->
309                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <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">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
317                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
319                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
320                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
321                 </fields>
322                 <links>
323                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
324                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
329                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
330                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
331                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <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">
337                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
338                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
339                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
340                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
341                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
342                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
343                 </fields>
344                 <links>
345                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
346                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
347                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
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="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">
360                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
361                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
362                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
363                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
364                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
365                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
366                 </fields>
367                 <links>
368                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
369                 </links>
370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
371                         <actions>
372                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
373                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
374                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
375                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
376                         </actions>
377                 </permacrud>
378         </class>
379
380         <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">
381                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
382                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
383                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
384                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
385                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
386                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
387                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
388                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
389                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
390                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
391                 </fields>
392                 <links>
393                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
394                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
395             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
396             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
412                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
413                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
414                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
415                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
416                 </fields>
417                 <links/>
418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
419                         <actions>
420                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
421                 <retrieve/>
422                 <!--
423                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
424                 -->
425                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
426                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
427                         </actions>
428                 </permacrud>
429         </class>
430
431         <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">
432                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
433                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
434                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
435                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
436                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
437                 </fields>
438                 <links>
439                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
440                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
441                 </links>
442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
443                         <actions>
444                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
445                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
446                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
447                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
448                         </actions>
449                 </permacrud>
450         </class>
451
452         <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">
453                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
454                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
455                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
456                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
457                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
458                 </fields>
459                 <links>
460                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
461                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
462                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
463                 </links>
464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
465                         <actions>
466                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                         </actions>
471                 </permacrud>
472         </class>
473
474
475         <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">
476                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
477                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
478                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
479                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
480                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
481                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
482                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
483                 </fields>
484                 <links>
485                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
487                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
488                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
489                 </links>
490         </class>
491
492     <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">
493         <fields oils_persist:primary="id">
494             <field reporter:label="ID" name="id" reporter:datatype="id"/>
495             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
496             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
497             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
498             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
499         </fields>
500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501             <actions>
502                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
503                 <retrieve/>
504                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
505                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
506             </actions>
507         </permacrud>
508     </class>
509
510         <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">
511                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
512                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
513                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
514                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
515                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
516                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
517                 </fields>
518                 <links>
519                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
520                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
521                 </links>
522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
523             <actions>
524                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
525                 <retrieve/>
526                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
527                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
528             </actions>
529         </permacrud>
530         </class>
531
532         <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">
533                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
534                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
535                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
536                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
537                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
538                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
539                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
540                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
541                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
542                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
543                 </fields>
544                 <links>
545                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
546                 </links>
547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
548             <actions>
549                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
550                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
551                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
552                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
553             </actions>
554         </permacrud>
555         </class>
556
557     <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">
558         <fields oils_persist:primary="name">
559             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
560             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
561             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
562             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
563             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
564             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
565             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
566             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
567             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
568         </fields>
569         <links>
570             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
571         </links>
572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573             <actions>
574                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
575                 <retrieve/>
576                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
577                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
578             </actions>
579         </permacrud>
580     </class>
581
582     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
583         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
584             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
585             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
586             <field reporter:label="Name" name="name" reporter:datatype="text"/>
587             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
588             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
589             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
590             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
591         </fields>
592         <links>
593             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
594         </links>
595     </class>
596
597         <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">
598                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
599                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
600                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
601                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
602                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
603                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
604                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
605                 </fields>
606                 <links>
607             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
608             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <retrieve/>
613                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
614                         </actions>
615                 </permacrud>
616         </class>
617
618         <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">
619                 <fields oils_persist:primary="key">
620                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
621                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
622                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
623                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
624                 </fields>
625                 <links/>
626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
627                         <actions>
628                                 <create permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
629                                 <retrieve/>
630                                 <update permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
631                                 <delete permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
632                         </actions>
633                 </permacrud>
634         </class>
635
636         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
637                 <fields oils_persist:primary="module">
638                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
639                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
640                 </fields>
641                 <links/>
642         </class>
643
644         <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">
645                 <fields oils_persist:primary="module">
646                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
647                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
648                 </fields>
649                 <links/>
650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
651                         <actions>
652                                 <create permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
653                                 <retrieve/>
654                                 <update permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
655                                 <delete permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
656                         </actions>
657                 </permacrud>
658         </class>
659
660         <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">
661                 <fields oils_persist:primary="module">
662                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                 </fields>
665                 <links/>
666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
667                         <actions>
668                                 <create permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
669                                 <retrieve/>
670                                 <update permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
671                                 <delete permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
672                         </actions>
673                 </permacrud>
674         </class>
675
676         <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">
677                 <fields oils_persist:primary="module">
678                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
679                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
680                 </fields>
681                 <links/>
682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
683                         <actions>
684                                 <create permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
685                                 <retrieve/>
686                                 <update permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
687                                 <delete permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
688                         </actions>
689                 </permacrud>
690         </class>
691
692         <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">
693                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
694                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
695                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
696                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
697                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
698                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
699                 </fields>
700                 <links>
701                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
702                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
703                 </links>
704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
705                         <actions>
706                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
707                     <context link="event_def" field="owner"/>
708                 </create>
709                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
710                     <context link="event_def" field="owner"/>
711                 </retrieve>
712                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
713                     <context link="event_def" field="owner"/>
714                 </update>
715                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
716                     <context link="event_def" field="owner"/>
717                 </delete>
718                         </actions>
719                 </permacrud>
720         </class>
721
722         <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">
723                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
724                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
725                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
726                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
727                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
728                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
729                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
730                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
731                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
732                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
733                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
734                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
735                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
736                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
737                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
738                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
739                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
740                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
741                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
742                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
743                 </fields>
744                 <links>
745                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
746                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
747                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
748                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
749                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
750                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
751                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
752                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
753                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
754                 </links>
755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756                         <actions>
757                                 <create permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
758                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
759                                 <update permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
760                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
761                         </actions>
762                 </permacrud>
763         </class>
764
765         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
766                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
767                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
768                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
769                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
770                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
771                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
772                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
773                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
774                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
775                         <field reporter:label="State" name="state" reporter:datatype="text"/>
776                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
777                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
778                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
779                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
780                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
781                 </fields>
782                 <links>
783                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
784                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
785                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
786                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
787                 </links>
788         </class>
789
790         <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">
791                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
792                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
793                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
794                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
795                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
796                 </fields>
797                 <links>
798                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
799                 </links>
800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
801                         <actions>
802                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
803                     <context link="event_def" field="owner"/>
804                 </create>
805                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
806                     <context link="event_def" field="owner"/>
807                 </retrieve>
808                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
809                     <context link="event_def" field="owner"/>
810                 </update>
811                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
812                     <context link="event_def" field="owner"/>
813                 </delete>
814                         </actions>
815                 </permacrud>
816         </class>
817
818         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
819                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
820                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
821                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
822                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
823                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
824                 </fields>
825                 <links>
826                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
827                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
828                 </links>
829         </class>
830
831         <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">
832                 <fields oils_persist:primary="code">
833                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
834                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
835                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
836                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
837                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
838                 </fields>
839                 <links/>
840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
841             <actions>
842                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
843                 <retrieve/>
844                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
845                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
846             </actions>
847         </permacrud>
848         </class>
849
850         <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">
851                 <fields oils_persist:primary="code">
852                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
853                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
854                 </fields>
855                 <links/>
856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
857             <actions>
858                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
859                 <retrieve/>
860                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
861                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
862             </actions>
863         </permacrud>
864         </class>
865
866         <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">
867                 <fields oils_persist:primary="code">
868                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
869                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
870                 </fields>
871                 <links/>
872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
873             <actions>
874                 <create permission="CREATE_INVOICE_METHOD" global_required="true"/>
875                 <retrieve/>
876                 <update permission="UPDATE_INVOICE_METHOD" global_required="true"/>
877                 <delete permission="DELETE_INVOICE_METHOD" global_required="true"/>
878             </actions>
879         </permacrud>
880         </class>
881
882         <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">
883                 <fields oils_persist:primary="code">
884                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
885                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
886                 </fields>
887                 <links/>
888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
889             <actions>
890                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
891                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
892                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
893                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
894             </actions>
895         </permacrud>
896         </class>
897
898         <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">
899                 <fields oils_persist:primary="code">
900                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
901                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
902                 </fields>
903                 <links/>
904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
905             <actions>
906                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
907                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
908                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
909                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
910             </actions>
911         </permacrud>
912         </class>
913
914         <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">
915                 <fields oils_persist:primary="code">
916                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
917                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
918                 </fields>
919                 <links/>
920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
921             <actions>
922                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
923                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
924                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
925                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
926             </actions>
927         </permacrud>
928         </class>
929
930         <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">
931                 <fields oils_persist:primary="code">
932                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
933                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
934                 </fields>
935                 <links/>
936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937             <actions>
938                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
939                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
940                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
941                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
942             </actions>
943         </permacrud>
944         </class>
945
946         <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">
947                 <fields oils_persist:primary="code">
948                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
949                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
950                 </fields>
951                 <links/>
952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
953             <actions>
954                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
955                 <retrieve/>
956                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
957                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
958             </actions>
959         </permacrud>
960         </class>
961
962         <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">
963                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
964                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
965                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
966                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
967                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
968                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
969                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
970                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
971                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
972                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
973                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
974                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
975                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
976                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
977                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
978                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
979                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
980                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
981                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
982                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
983                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
984                 </fields>
985                 <links>
986                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
987                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
988                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
989                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
990                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
991                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
992                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
993                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
994                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
995                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
996                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
997                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
998             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
999                 </links>
1000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1001             <actions>
1002                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1003                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1004                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1005                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1006             </actions>
1007         </permacrud>
1008         </class>
1009
1010         <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">
1011                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1012                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1013                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1014                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1015                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1016                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1017                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1018                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1019                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1020                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1021                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1022                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1023                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1024                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1025                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1026                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1027                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1028                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1029                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1030                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1031                 </fields>
1032                 <links>
1033                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1034                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1035                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1036                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1037                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1038                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1039                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1040                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1041                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1042                 </links>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1046                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1047                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <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">
1054                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1055                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1056                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1057                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1058                 </fields>
1059                 <links>
1060                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1061                 </links>
1062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1063             <actions>
1064                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1065                     <context link="matchpoint" field="org_unit"/>
1066                 </create>
1067                 <retrieve/>
1068                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1069                     <context link="matchpoint" field="org_unit"/>
1070                 </update>
1071                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1072                     <context link="matchpoint" field="org_unit"/>
1073                 </delete>
1074             </actions>
1075         </permacrud>
1076         </class>
1077
1078         <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">
1079                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1080                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1081                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1082                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1083                 </fields>
1084                 <links>
1085                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1086                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1087                 </links>
1088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1089             <actions>
1090                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1091                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1092                 </create>
1093                 <retrieve/>
1094                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1095                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1096                 </update>
1097                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1098                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1099                 </delete>
1100             </actions>
1101         </permacrud>
1102         </class>
1103
1104         <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">
1105                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1106                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1107                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1108                 </fields>
1109                 <links/>
1110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1111             <actions>
1112                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1113                 <retrieve/>
1114                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1115                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1116             </actions>
1117         </permacrud>
1118         </class>
1119
1120         <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">
1121                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1122                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1123                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1124                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1125                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1126                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1127                 </fields>
1128                 <links>
1129                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1130                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1131                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1132                 </links>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="ADMIN_SURVEY">
1136                     <context link="survey" field="owner"/>
1137                 </create>
1138                 <retrieve/>
1139                 <update permission="ADMIN_SURVEY">
1140                     <context link="survey" field="owner"/>
1141                 </update>
1142                 <delete permission="ADMIN_SURVEY">
1143                     <context link="survey" field="owner"/>
1144                 </delete>
1145             </actions>
1146         </permacrud>
1147         </class>
1148         <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">
1149                 <fields oils_persist:primary="id" oils_persist:sequence="">
1150                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1151                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1152                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1153                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1154                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1155                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1156                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1157                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1158                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1159                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1160                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1161                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1162                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1163                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1164                 </fields>
1165                 <links>
1166                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1167                 </links>
1168         </class>
1169         <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">
1170                 <fields oils_persist:primary="id" oils_persist:sequence="">
1171                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1172                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1173                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1174                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1175                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1176                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1177                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1178                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1179                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1180                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1181                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1182                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1183                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1184                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1185                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1186                 </fields>
1187                 <links>
1188                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1189                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1190                 </links>
1191         </class>
1192         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1194                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1195                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1196                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1197                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1198                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1199                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1200                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1201                 </fields>
1202                 <links>
1203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1204                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1205                 </links>
1206         </class>
1207         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1208                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1209                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1210                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1211                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1212                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1213                 </fields>
1214                 <links>
1215                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1217                 </links>
1218         </class>
1219         <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">
1220                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1221                         <field name="field" reporter:datatype="link"/>
1222                         <field name="id" reporter:datatype="id" />
1223                         <field name="source" reporter:datatype="link"/>
1224                         <field name="value" reporter:datatype="text"/>
1225                 </fields>
1226                 <links>
1227                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1228                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1229                 </links>
1230         </class>
1231         <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">
1232                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1233                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1234                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1235                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1236                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1237                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1238                 </fields>
1239                 <links>
1240                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1241                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1242                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1243                 </links>
1244         </class>
1245         <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">
1246                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1247                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1248                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1249                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1250                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1251                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1252                 </fields>
1253                 <links>
1254                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1255                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1256                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1257                 </links>
1258         </class>
1259         <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">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1261                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1262                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1263                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1264                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1265                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1266                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1267                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1268                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1269                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1270                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1271                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1272                 </fields>
1273                 <links>
1274                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1275                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1276                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1277                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1278                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1279                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1280                 </links>
1281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1282             <actions>
1283                 <create permission="TRANSIT_COPY" context_field="owner">
1284                     <context link="target_copy" field="circ_lib"/>
1285                 </create>
1286                 <retrieve/>
1287                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1288                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1289             </actions>
1290         </permacrud>
1291         </class>
1292         <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">
1293                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1294                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1295                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1296                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1297                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1298                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1299                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1300                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1301                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1302                 </fields>
1303                 <links>
1304                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1305                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1306                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1307                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1308                 </links>
1309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1310             <actions>
1311                 <create permission="ADMIN_SURVEY">
1312                     <context link="survey" field="owner"/>
1313                 </create>
1314                 <retrieve/>
1315                 <update permission="ADMIN_SURVEY">
1316                     <context link="survey" field="owner"/>
1317                 </update>
1318                 <delete permission="ADMIN_SURVEY">
1319                     <context link="survey" field="owner"/>
1320                 </delete>
1321             </actions>
1322         </permacrud>
1323         </class>
1324         <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">
1325                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1326                         <field name="bucket" />
1327                         <field name="id" reporter:datatype="id" />
1328                         <field name="target_copy" reporter:datatype="link"/>
1329                         <field name="create_time" reporter:datatype="timestamp" />
1330                         <field name="pos" reporter:datatype="int" />
1331                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1332                 </fields>
1333                 <links>
1334                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1335                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1336             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1337                 </links>
1338         </class>
1339         <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">
1340                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1341                         <field name="id" reporter:datatype="id" />
1342                         <field name="item" reporter:datatype="link"/>
1343                         <field name="note" reporter:datatype="text" />
1344                 </fields>
1345                 <links>
1346                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1347                 </links>
1348         </class>
1349         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1350                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1351                         <field name="active" reporter:datatype="bool"/>
1352                         <field name="arn_source" />
1353                         <field name="arn_value" />
1354                         <field name="create_date" reporter:datatype="timestamp"/>
1355                         <field name="creator" />
1356                         <field name="deleted" reporter:datatype="bool"/>
1357                         <field name="edit_date" reporter:datatype="timestamp"/>
1358                         <field name="editor" />
1359                         <field name="id" reporter:datatype="id" />
1360                         <field name="last_xact_id" />
1361                         <field name="marc" />
1362                         <field name="source" />
1363                         <field name="fixed_fields" oils_persist:virtual="true" />
1364                         <field name="notes" oils_persist:virtual="true" />
1365                 </fields>
1366                 <links>
1367                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1368                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1369                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1370                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1371                 </links>
1372         </class>
1373         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1374                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1375                         <field name="char_encoding" />
1376                         <field name="id" />
1377                         <field name="record" />
1378                         <field name="record_status" />
1379                 </fields>
1380                 <links>
1381                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1382                 </links>
1383         </class>
1384         <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">
1385                 <fields oils_persist:primary="code" oils_persist:sequence="">
1386                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1387                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391             <actions>
1392                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1393                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1394                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1395                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1396             </actions>
1397         </permacrud>
1398         </class>
1399         <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">
1400                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1401                         <field name="accepting_usr" />
1402                         <field name="amount" reporter:datatype="money" />
1403                         <field name="amount_collected" reporter:datatype="money" />
1404                         <field name="approval_code" reporter:datatype="text"/>
1405                         <field name="cash_drawer" reporter:datatype="link"/>
1406                         <field name="cc_number" reporter:datatype="text"/>
1407                         <field name="cc_type" reporter:datatype="text"/>
1408                         <field name="cc_processor" reporter:datatype="text"/>
1409                         <field name="expire_month" reporter:datatype="int" />
1410                         <field name="expire_year" reporter:datatype="int" />
1411                         <field name="id" reporter:datatype="id" />
1412                         <field name="note" reporter:datatype="text"/>
1413                         <field name="payment_ts" reporter:datatype="timestamp"/>
1414                         <field name="xact" reporter:datatype="link"/>
1415                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1416                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1417                 </fields>
1418                 <links>
1419                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1420                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1421                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1422                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1423                 </links>
1424         </class>
1425         <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">
1426                 <fields oils_persist:primary="name">
1427                         <field reporter:label="Field Class" name="field_class" />
1428                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1429                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1430                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1431                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1432                 </fields>
1433                 <links/>
1434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1435             <actions>
1436                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1437                 <retrieve/>
1438                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1439                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1440             </actions>
1441         </permacrud>
1442         </class>
1443         <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">
1444                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1445                         <field name="field_class" />
1446                         <field name="id" reporter:datatype="id" />
1447                         <field name="name" reporter:datatype="text"/>
1448                         <field name="xpath" reporter:datatype="text"/>
1449                         <field name="weight" reporter:datatype="int" />
1450                         <field name="format" reporter:datatype="link"/>
1451                         <field name="search_field" reporter:datatype="bool" />
1452                         <field name="facet_field" reporter:datatype="bool" />
1453                 </fields>
1454                 <links/>
1455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1456             <actions>
1457                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1458                 <retrieve/>
1459                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1460                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1461             </actions>
1462         </permacrud>
1463         </class>
1464         <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">
1465                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1466                         <field name="id" reporter:datatype="id" />
1467                         <field name="name" reporter:datatype="text"/>
1468                         <field name="xpath" reporter:datatype="text"/>
1469                         <field name="format" reporter:datatype="link"/>
1470                         <field name="first_word" reporter:datatype="bool" />
1471                 </fields>
1472                 <links/>
1473         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1474             <actions>
1475                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1476                 <retrieve/>
1477                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1478                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1479             </actions>
1480         </permacrud>
1481         </class>
1482         <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">
1483                 <fields oils_persist:primary="code" oils_persist:sequence="">
1484                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1485                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1486                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1487                 </fields>
1488                 <links/>
1489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1490             <actions>
1491                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1492                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1493                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1494                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1495             </actions>
1496         </permacrud>
1497         </class>
1498         <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">
1499                 <fields oils_persist:primary="code" oils_persist:sequence="">
1500                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1501                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1502                 </fields>
1503                 <links/>
1504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1505             <actions>
1506                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1507                 <retrieve/>
1508                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1509                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1510             </actions>
1511         </permacrud>
1512         </class>
1513         <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">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1515                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1516                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1517                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1518                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1519                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1520                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1521                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1522                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1523                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1524                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1525                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1526                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1527                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1528                 </fields>
1529                 <links>
1530                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1531                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1532                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1533                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1534                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1535                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1536                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1537                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1538                 </links>
1539         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1540             <actions>
1541                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1542                 <retrieve/>
1543                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1544                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1545             </actions>
1546         </permacrud>
1547         </class>
1548         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1549                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1550                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1551                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1552                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1553                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1554                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1555                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1556                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1557                 </fields>
1558                 <links>
1559                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1560                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1561         </links>
1562         </class>
1563         <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">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1565                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1567                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1568                 </fields>
1569                 <links>
1570                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1571                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1572                 </links>
1573         </class>
1574         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1575                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1576                         <field name="id" reporter:datatype="id" />
1577                         <field name="value" oils_persist:i18n="true" />
1578                 </fields>
1579                 <links/>
1580         </class>
1581         <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">
1582                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1583                         <field name="balance_owed" reporter:datatype="money" />
1584                         <field name="total_owed" reporter:datatype="money" />
1585                         <field name="total_paid" reporter:datatype="money" />
1586                         <field name="usr" reporter:datatype="link"/>
1587                 </fields>
1588                 <links>
1589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1590         </links>
1591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1592             <actions>
1593                 <retrieve permission="VIEW_USER">
1594                     <context link="usr" field="home_ou"/>
1595                 </retrieve>
1596             </actions>
1597         </permacrud>
1598         </class>
1599         <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">
1600                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1601                         <field name="collector" />
1602                         <field name="enter_time" reporter:datatype="timestamp"/>
1603                         <field name="id" reporter:datatype="id" />
1604                         <field name="location" reporter:datatype="link"/>
1605                         <field name="usr" reporter:datatype="link"/>
1606                 </fields>
1607                 <links>
1608                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1609                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1610                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1611                 </links>
1612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1613             <actions>
1614                 <create permission="money.collections_tracker.create" context_field="location"/>
1615                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1616                 <delete permission="money.collections_tracker.create" context_field="location"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620         <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">
1621                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1622                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1623                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1624                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1625                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1626                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1627                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1628                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1629                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1630                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1631                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1632                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1633                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1634                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1635                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1636                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1637                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1638                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1639                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1640                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1641                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1642                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1643                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1644                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1645                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1646                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1647                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1648                 </fields>
1649                 <links>
1650                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1651                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1652                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1653                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1654                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1655                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1656                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1657                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1658                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1659                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1660                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1661                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1662                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1663                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1664                 </links>
1665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1666             <actions>
1667                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1668                 <retrieve/>
1669                 <update permission="UPDATE_MARC" global_required="true"/>
1670             </actions>
1671         </permacrud>
1672         </class>
1673         <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">
1674                 <fields oils_persist:primary="id">
1675                         <field name="dow_0_close" />
1676                         <field name="dow_0_open" />
1677                         <field name="dow_1_close" />
1678                         <field name="dow_1_open" />
1679                         <field name="dow_2_close" />
1680                         <field name="dow_2_open" />
1681                         <field name="dow_3_close" />
1682                         <field name="dow_3_open" />
1683                         <field name="dow_4_close" />
1684                         <field name="dow_4_open" />
1685                         <field name="dow_5_close" />
1686                         <field name="dow_5_open" />
1687                         <field name="dow_6_close" />
1688                         <field name="dow_6_open" />
1689                         <field name="id" reporter:datatype="id" />
1690                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1691                 </fields>
1692                 <links>
1693                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1694                 </links>
1695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1696             <actions>
1697                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1698                 <retrieve/>
1699                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1700                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1701             </actions>
1702         </permacrud>
1703         </class>
1704         <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">
1705                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1706                         <field name="close_end" reporter:datatype="timestamp" />
1707                         <field name="close_start" reporter:datatype="timestamp" />
1708                         <field name="id" reporter:datatype="id" />
1709                         <field name="org_unit" reporter:datatype="org_unit"/>
1710                         <field name="reason" reporter:datatype="text"/>
1711                 </fields>
1712                 <links>
1713                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1714                 </links>
1715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1716             <actions>
1717                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1718                 <retrieve/>
1719                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1720                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1721             </actions>
1722         </permacrud>
1723         </class>
1724         <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">
1725                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1726                         <field name="extended" reporter:datatype="interval"/>
1727                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1728                         <field name="max_renewals" reporter:datatype="int" />
1729                         <field name="name" reporter:datatype="text"/>
1730                         <field name="normal" reporter:datatype="interval"/>
1731                         <field name="shrt" reporter:datatype="interval"/>
1732                 </fields>
1733                 <links>
1734                 </links>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1740                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744         <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">
1745                 <fields oils_persist:primary="id" oils_persist:sequence="">
1746                         <field name="balance_owed" reporter:datatype="money"/>
1747                         <field name="id" reporter:datatype="id" />
1748                         <field name="last_billing_note" reporter:datatype="text"/>
1749                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1750                         <field name="last_billing_type" reporter:datatype="text"/>
1751                         <field name="last_payment_note" reporter:datatype="text"/>
1752                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1753                         <field name="last_payment_type" reporter:datatype="text"/>
1754                         <field name="total_owed" reporter:datatype="money"/>
1755                         <field name="total_paid" reporter:datatype="money"/>
1756                         <field name="usr" reporter:datatype="link"/>
1757                         <field name="xact_finish" reporter:datatype="timestamp" />
1758                         <field name="xact_start" reporter:datatype="timestamp" />
1759                         <field name="xact_type" reporter:datatype="text"/>
1760                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1761                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1762                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1763                         <field name="billing_location" reporter:datatype="link"/>
1764                 </fields>
1765                 <links>
1766                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1767                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1768                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1769                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1770                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1771                 </links>
1772         </class>
1773         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1774                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1775                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1776                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1777                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1778                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1779                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1780                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1781                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1782                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1783                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1784                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1785                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1786                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1787                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1788                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1789                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1790                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1791                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1792                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1793                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1794                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1795                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1796                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1797                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1798                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1799                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1800                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1801                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1802                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1803                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1804                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1805                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1806                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1807                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1808                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1809                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1810                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1811                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1812                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1813                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1814                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1815                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1816                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1817                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1818                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1819                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1820                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1821                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1822                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1823                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1824                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1825                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1826                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1827                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1828                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1829                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1830                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1831                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1832                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1833                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1834                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1835                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1836                 </fields>
1837                 <links>
1838                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1839                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1840                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1841                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1842                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1843                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1844                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1845                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1846                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1847                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1848                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1849                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1850                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1851                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1852                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1853                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1854                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1855                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1856                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1857                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1858                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1859                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1860                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1861                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1862                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1863                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1864                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1865                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1866                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1867                 </links>
1868         </class>
1869
1870         <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">
1871                 <fields oils_persist:primary="name">
1872                         <field name="name" reporter:datatype="text"/>
1873                         <field name="label" reporter:datatype="text"/>
1874                         <field name="description" reporter:datatype="text"/>
1875                         <field name="datatype" reporter:datatype="text"/>
1876                         <field name="fm_class" reporter:datatype="text"/>
1877                 </fields>
1878                 <links>
1879                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1880                 </links>
1881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1882                         <actions>
1883                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1884                                 <retrieve/>
1885                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1886                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1887                         </actions>
1888                 </permacrud>
1889         </class>
1890         <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">
1891                 <fields oils_persist:primary="name">
1892                         <field name="name" reporter:datatype="text"/>
1893                         <field name="label" reporter:datatype="text"/>
1894                         <field name="description" reporter:datatype="text"/>
1895                         <field name="datatype" reporter:datatype="text"/>
1896                         <field name="view_perm" reporter:datatype="link"/>
1897                         <field name="update_perm" reporter:datatype="link"/>
1898                         <field name="fm_class" reporter:datatype="text"/>
1899                 </fields>
1900                 <links>
1901                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1902                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
1903                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
1904                 </links>
1905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1906                         <actions>
1907                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1908                                 <retrieve/>
1909                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1910                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1911                         </actions>
1912                 </permacrud>
1913         </class>
1914         <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">
1915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1916                         <field name="id" />
1917                         <field name="name"  reporter:datatype="text"/>
1918                         <field name="org_unit" reporter:datatype="org_unit"/>
1919                         <field name="value"  reporter:datatype="text"/>
1920                 </fields>
1921                 <links>
1922                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1924                 </links>
1925         </class>
1926         <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">
1927                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1928                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1929                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
1930                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1931                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
1932                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1933                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
1934                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
1935                 </fields>
1936                 <links>
1937                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
1938                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1939                 </links>
1940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1941             <actions>
1942                 <create permission="CREATE_COPY_NOTE">
1943                     <context link="owning_copy" field="circ_lib"/>
1944                 </create>
1945                 <retrieve permission="VIEW_COPY_NOTES">
1946                     <context link="owning_copy" field="circ_lib"/>
1947                 </retrieve>
1948                 <update permission="UPDATE_COPY_NOTE">
1949                     <context link="owning_copy" field="circ_lib"/>
1950                 </update>
1951                 <delete permission="DELETE_COPY_NOTE">
1952                     <context link="owning_copy" field="circ_lib"/>
1953                 </delete>
1954             </actions>
1955         </permacrud>
1956         </class>
1957         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
1958                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
1959                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
1960                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
1961                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
1962                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1963                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
1964                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
1965                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
1966                 </fields>
1967                 <links>
1968                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1969                 </links>
1970         </class>
1971         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
1972                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
1973                         <field name="fingerprint"  reporter:datatype="text"/>
1974                         <field name="id" reporter:datatype="id" />
1975                         <field name="master_record" reporter:datatype="link"/>
1976                         <field name="mods"  reporter:datatype="text"/>
1977                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
1978                 </fields>
1979                 <links>
1980                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
1981                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
1982                 </links>
1983         </class>
1984         <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">
1985                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
1986                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1987                         <field name="name"  reporter:datatype="text"/>
1988                 </fields>
1989                 <links/>
1990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1991             <actions>
1992                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
1993                 <retrieve/>
1994                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
1995                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
1996             </actions>
1997         </permacrud>
1998         </class>
1999         <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">
2000                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2001                         <field name="code"  reporter:datatype="text"/>
2002                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2003                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2004                 </fields>
2005                 <links/>
2006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2007             <actions>
2008                 <create permission="CREATE_PERM" global_required="true"/>
2009                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2010                 <update permission="UPDATE_PERM" global_required="true"/>
2011                 <delete permission="DELETE_PERM" global_required="true"/>
2012             </actions>
2013         </permacrud>
2014         </class>
2015         <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">
2016                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2017                         <field name="id" reporter:datatype="id" />
2018                         <field name="metarecord" reporter:datatype="link"/>
2019                         <field name="source" reporter:datatype="link"/>
2020                 </fields>
2021                 <links>
2022                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2023                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2024                 </links>
2025         </class>
2026         <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">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2028                         <field name="field" reporter:datatype="link"/>
2029                         <field name="id" reporter:datatype="id" />
2030                         <field name="source" reporter:datatype="link"/>
2031                         <field name="value"  reporter:datatype="text"/>
2032                 </fields>
2033                 <links>
2034                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2035                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2036                 </links>
2037         </class>
2038         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2039                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2040                         <field name="accepting_usr" reporter:datatype="link"/>
2041                         <field name="amount" reporter:datatype="money" />
2042                         <field name="amount_collected" reporter:datatype="money" />
2043                         <field name="cash_drawer" reporter:datatype="link"/>
2044                         <field name="id" reporter:datatype="id" />
2045                         <field name="note"  reporter:datatype="text"/>
2046                         <field name="payment_ts" reporter:datatype="timestamp"/>
2047                         <field name="xact" reporter:datatype="link"/>
2048                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2049                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2050                 </fields>
2051                 <links>
2052                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2053                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2054                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2055                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2056                 </links>
2057         </class>
2058         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2059                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2060                         <field name="accepting_usr" reporter:datatype="link"/>
2061                         <field name="amount" reporter:datatype="money" />
2062                         <field name="amount_collected" reporter:datatype="money" />
2063                         <field name="id" reporter:datatype="id" />
2064                         <field name="note"  reporter:datatype="text"/>
2065                         <field name="payment_ts" reporter:datatype="timestamp"/>
2066                         <field name="xact" reporter:datatype="link"/>
2067                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2068                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2069                 </fields>
2070                 <links>
2071                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2072                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2073                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2074                 </links>
2075         </class>
2076         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2077                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2078                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2079                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2080                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2081                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2082                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2083                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2084                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2085                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2086                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2087                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2088                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2089                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2090                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2091                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2092                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2093                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2094                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2095                 </fields>
2096                 <links>
2097                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2098                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2099                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2100                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2101                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2102                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2103                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2104                 </links>
2105         </class>
2106
2107         <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">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2109                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field name="name"  reporter:datatype="text"/>
2111                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2112                         <field name="block_list" reporter:datatype="text"/>
2113                         <field name="org_depth" reporter:datatype="int"/>
2114                 </fields>
2115                 <links/>
2116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2117             <actions>
2118                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2119                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2120                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2121                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2122             </actions>
2123         </permacrud>
2124         </class>
2125         <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">
2126                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2127                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2128                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2129                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2130                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2131                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2132                 </fields>
2133                 <links>
2134                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2135                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2136                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2137         </links>
2138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2139             <actions>
2140                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2141                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2142                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2143                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2144             </actions>
2145         </permacrud>
2146         </class>
2147         <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">
2148                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2149                         <field name="holdable" reporter:datatype="bool"/>
2150                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2151                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2152                         <field name="opac_visible" reporter:datatype="bool"/>
2153                 </fields>
2154                 <links/>
2155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2156             <actions>
2157                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2158                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
2159                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2160                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2161             </actions>
2162         </permacrud>
2163         </class>
2164         <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">
2165                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2166                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2167                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2168                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2169                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2170                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2171                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2172                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2173                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2174                 </fields>
2175                 <links>
2176                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2177                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2178                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2179                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2180                 </links>
2181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2182                         <actions>
2183                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2184                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2185                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2186                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2187                         </actions>
2188                 </permacrud>
2189         </class>
2190         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2191                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2192                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2193                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2194                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2195                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2196                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2197                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2198                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2199                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2200                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2201                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2202                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2203                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2204                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2205                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2206                 </fields>
2207                 <links>
2208                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2209                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2210                 </links>
2211         </class>
2212         <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">
2213                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2214                         <field name="call_number" />
2215                         <field name="create_date" reporter:datatype="timestamp"/>
2216                         <field name="creator" reporter:datatype="link"/>
2217                         <field name="id" reporter:datatype="id" />
2218                         <field name="pub" reporter:datatype="bool"/>
2219                         <field name="title"  reporter:datatype="text"/>
2220                         <field name="value"  reporter:datatype="text"/>
2221                 </fields>
2222                 <links>
2223                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2224                 </links>
2225         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2226             <actions>
2227                 <create permission="CREATE_VOLUME_NOTE">
2228                     <context link="call_number" field="owning_lib"/>
2229                 </create>
2230                 <retrieve permission="VIEW_VOLUME_NOTES">
2231                     <context link="call_number" field="owning_lib"/>
2232                 </retrieve>
2233                 <update permission="UPDATE_VOLUME_NOTE">
2234                     <context link="call_number" field="owning_lib"/>
2235                 </update>
2236                 <delete permission="DELETE_VOLUME_NOTE">
2237                     <context link="call_number" field="owning_lib"/>
2238                 </delete>
2239             </actions>
2240         </permacrud>
2241         </class>
2242         <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">
2243                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2244                         <field name="create_date" reporter:datatype="timestamp"/>
2245                         <field name="creator" reporter:datatype="link"/>
2246                         <field name="edit_date" reporter:datatype="timestamp"/>
2247                         <field name="editor" reporter:datatype="link"/>
2248                         <field name="id" reporter:datatype="id" />
2249                         <field name="record" reporter:datatype="link"/>
2250                         <field name="value" reporter:datatype="text"/>
2251                 </fields>
2252                 <links>
2253                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2254                 </links>
2255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2256             <actions>
2257                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2258                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2259                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2260                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2261             </actions>
2262         </permacrud>
2263         </class>
2264         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2265                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2266                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2267                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2268                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2269                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2270                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2271                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2272                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2274                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2275                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2276                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2277                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2278                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2279                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2280                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2281                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2282                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2283                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2284                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2285                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2286                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2287                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2288                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2289                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2290                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2291                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2292                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2293                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2294                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2295                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2296                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2297                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2298                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2299                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2300                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2301                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2302                 </fields>
2303                 <links>
2304                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2305                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2306                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2307                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2308                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2309                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2310                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2311                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2312                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2313                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2314                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2315                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2316                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2317                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2318                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2319                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2320                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2321                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2322                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2323                 </links>
2324         </class>
2325         <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">
2326                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2327                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2328                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2329                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2330                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2331                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2332                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2333                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2334                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2335                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2336                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2337                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2338                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2339                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2340                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2341                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2342                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2343                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2344                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2345                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2346                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2347                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2348                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2349                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2350                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2351                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2352                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2353                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2354                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2355                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2356                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2357                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2358                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2359                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2360                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2361                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2362                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2363                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2364                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2365                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2366                 </fields>
2367                 <links>
2368                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2369                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2370                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2372                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2373                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2375                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2376                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2377                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2378                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2379                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2380                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2381                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2382                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2383                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2384                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2385                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2386                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2387                 </links>
2388         </class>
2389         <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">
2390                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2391                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2392                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2393                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2394                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2395                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2396                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2397                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2398                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2399                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2400                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2401                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2402                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2403                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2404                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2405                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2406                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2407                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2408                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2409                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2410                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2411                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2412                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2413                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2414                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2415                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2416                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2417                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2418                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2419                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2420                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2424                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2425                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2426                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2427                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2428                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2429                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2430                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2431                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2432                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2433                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2434                 </fields>
2435                 <links>
2436                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2437                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2438                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2439                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2440                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2441                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2442                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2443                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2444                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2445                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2446                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2447                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2448                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2449                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2450                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2451                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2452                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2453                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2454                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2455                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2456                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2457                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2458                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2459                 </links>
2460         </class>
2461
2462         <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">
2463                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2464                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2465                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2466                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2467                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2468                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2469                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2470                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2471                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2472                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2473                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2474                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2475                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2476                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2477                 </fields>
2478                 <links>
2479                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2480                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2481                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2482                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2483                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2484                 </links>
2485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486                         <actions>
2487                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2488                                 <retrieve />
2489                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2490                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2491                         </actions>
2492                 </permacrud>
2493         </class>
2494
2495         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2496                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2497                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2498                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2499                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2500                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2501                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2502                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2503                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2504                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2505                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2506                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2507                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2508                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2509                 </fields>
2510                 <links>
2511                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2512                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2513                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2514                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2515                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2516                 </links>
2517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2518                         <actions>
2519                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2520                                 <retrieve />
2521                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2522                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2523                         </actions>
2524                 </permacrud>
2525         </class>
2526         
2527         <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">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2529                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2530                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2531                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2532                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2533                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2534                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2535                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2536                 </fields>
2537                 <links>
2538                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2539                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2540                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2541                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2546                                 <retrieve />
2547                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2548                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552         
2553         <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">
2554                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2555                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2556                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2557                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2558                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2559                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2560                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2561                 </fields>
2562                 <links>
2563                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2564                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2565                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2566                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2567                 </links>
2568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2569                         <actions>
2570                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2571                                 <retrieve />
2572                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2573                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2574                         </actions>
2575                 </permacrud>
2576         </class>
2577         
2578         <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">
2579                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2580                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2581                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2582                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2583                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2584                 </fields>
2585                 <links>
2586                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2587                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2588                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2589                 </links>
2590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2591                         <actions>
2592                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2593                                 <retrieve />
2594                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2595                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2596                         </actions>
2597                 </permacrud>
2598         </class>
2599         
2600         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2601                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2602                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2603                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2604                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2605                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2606                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2607                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2608                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2609                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2610                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2611                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2612                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2613                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2614                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2615                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2616                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2617                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2618                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2619                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2620                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2621                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2622                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2623                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2624                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2625                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2626                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2627                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2628                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2629                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2630                 </fields>
2631                 <links>
2632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2633                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2634                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2635                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2636                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2637                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2638                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2639                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2640                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2641                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2642                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2643                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2644                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2645                 </links>
2646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2647                         <actions>
2648                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2649                                 <retrieve />
2650                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2651                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2652                         </actions>
2653                 </permacrud>
2654         </class>
2655         
2656         <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">
2657                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2658                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2659                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2660                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2661                 </fields>
2662                 <links>
2663                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2664                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2665                 </links>
2666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2667                         <actions>
2668                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2669                                 <retrieve />
2670                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2671                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2672                         </actions>
2673                 </permacrud>
2674         </class>
2675
2676         <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">
2677                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2678                         <field name="bucket" reporter:datatype="link"/>
2679                         <field name="id" reporter:datatype="id" />
2680                         <field name="target_call_number" reporter:datatype="link" />
2681                         <field name="create_time" reporter:datatype="timestamp" />
2682                         <field name="pos" reporter:datatype="int" />
2683                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2684                 </fields>
2685                 <links>
2686                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2687                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2688             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2689                 </links>
2690         </class>
2691         <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">
2692                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2693                         <field name="id" reporter:datatype="id" />
2694                         <field name="item" reporter:datatype="link"/>
2695                         <field name="note" reporter:datatype="text" />
2696                 </fields>
2697                 <links>
2698                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2699                 </links>
2700         </class>
2701         <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">
2702                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2703                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field name="btype" reporter:datatype="text"/>
2705                         <field name="id" reporter:datatype="id" />
2706                         <field name="name" reporter:datatype="text"/>
2707                         <field name="owner" reporter:datatype="link"/>
2708                         <field name="pub" reporter:datatype="bool"/>
2709                         <field name="create_time" reporter:datatype="timestamp" />
2710                 </fields>
2711                 <links>
2712                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2713                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2714                 </links>
2715         </class>
2716         <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">
2717                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2718                         <field name="id" reporter:datatype="id" />
2719                         <field name="bucket" reporter:datatype="link"/>
2720                         <field name="note" reporter:datatype="text" />
2721                 </fields>
2722                 <links>
2723                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2724                 </links>
2725         </class>
2726         <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">
2727                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2728                         <field name="hold" reporter:datatype="link"/>
2729                         <field name="id" reporter:datatype="id" />
2730                         <field name="target_copy" reporter:datatype="link"/>
2731                 </fields>
2732                 <links>
2733                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2734                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2735                 </links>
2736         </class>
2737         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2738                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2739                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2740                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2741                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2742                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2743                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2744                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2745                 </fields>
2746                 <links>
2747                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2748                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2749                 </links>
2750         </class>
2751         <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">
2752                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2753                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2754                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2755                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2756                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2757                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2758                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2759                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2760                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2761                 </fields>
2762                 <links>
2763                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2764                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2765                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2766                 </links>
2767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2768             <actions>
2769                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2770                 <retrieve/>
2771                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2772                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2773             </actions>
2774         </permacrud>
2775         </class>
2776
2777     <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">
2778         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2779             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2780             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2781             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2782             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2783         </fields>
2784         <links>
2785             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2786             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2787         </links>
2788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2789             <actions>
2790                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2791                 <retrieve/>
2792                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2793                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2794             </actions>
2795         </permacrud>
2796     </class>
2797
2798         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2799                 <fields>
2800                         <field name="id" oils_persist:virtual="true" />
2801                         <field name="location" oils_persist:virtual="true" />
2802                         <field name="owning_lib" oils_persist:virtual="true" />
2803                         <field name="holdings" oils_persist:virtual="true" />
2804                         <field name="current_holdings" oils_persist:virtual="true" />
2805                         <field name="supplements" oils_persist:virtual="true" />
2806                         <field name="current_supplements" oils_persist:virtual="true" />
2807                         <field name="indexes" oils_persist:virtual="true" />
2808                         <field name="current_indexes" oils_persist:virtual="true" />
2809                         <field name="online" oils_persist:virtual="true" />
2810                         <field name="missing" oils_persist:virtual="true" />
2811                         <field name="incomplete" oils_persist:virtual="true" />
2812                 </fields>
2813         </class>
2814         <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">
2815                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2816                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2817                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2818                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2819                         <field reporter:label="Creator" name="creator" />
2820                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2821                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2822                         <field reporter:label="Editor" name="editor" />
2823                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2824                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2825                         <field reporter:label="MARC" name="marc" />
2826                         <field reporter:label="Source" name="source" />
2827                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2828                 </fields>
2829                 <links>
2830                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2831                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2832                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2833                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2834                 </links>
2835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2836                         <actions>
2837                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2838                                 <retrieve/>
2839                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2840                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2841                         </actions>
2842                 </permacrud>
2843         </class>
2844         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2845                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2846                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2847                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2848                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2849                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2850                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2851                 </fields>
2852                 <links>
2853                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2854                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2855                 </links>
2856         </class>
2857         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2858                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2859                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2860                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2861                         <field reporter:label="Label" name="label" />
2862                 </fields>
2863                 <links>
2864                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2865                 </links>
2866         </class>
2867         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2868                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2869                         <field name="id" reporter:datatype="id" />
2870                         <field name="subscription" reporter:datatype="link"/>
2871                         <field name="target_copy" reporter:datatype="link"/>
2872                         <field name="location" reporter:datatype="link"/>
2873                         <field name="binding_unit" reporter:datatype="link"/>
2874                         <field name="label" />
2875                 </fields>
2876                 <links>
2877                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2878                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2879                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2880                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2881                 </links>
2882         </class>
2883         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2885                         <field name="id" reporter:datatype="id" />
2886                         <field name="subscription" reporter:datatype="link"/>
2887                         <field name="generated_coverage" reporter:datatype="text"/>
2888                         <field name="textual_holdings" reporter:datatype="text"/>
2889                 </fields>
2890                 <links>
2891                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2892                 </links>
2893         </class>
2894         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2895                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2896                         <field name="id" reporter:datatype="id" />
2897                         <field name="subscription" reporter:datatype="link"/>
2898                         <field name="generated_coverage" reporter:datatype="text"/>
2899                         <field name="textual_holdings" reporter:datatype="text"/>
2900                 </fields>
2901                 <links>
2902                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2903                 </links>
2904         </class>
2905         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2906                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2907                         <field name="id" reporter:datatype="id" />
2908                         <field name="subscription" reporter:datatype="link"/>
2909                         <field name="generated_coverage" reporter:datatype="text"/>
2910                         <field name="textual_holdings" reporter:datatype="text"/>
2911                 </fields>
2912                 <links>
2913                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2914                 </links>
2915         </class>
2916
2917         <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">
2918                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2919                         <field name="id" reporter:datatype="id" />
2920                         <field name="owning_copy" reporter:datatype="link"/>
2921                         <field name="stat_cat" reporter:datatype="link"/>
2922                         <field name="stat_cat_entry" reporter:datatype="link"/>
2923                 </fields>
2924                 <links>
2925                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2926                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2927                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2928                 </links>
2929         </class>
2930         <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">
2931                 <fields oils_persist:primary="code">
2932                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2933                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2934                 </fields>
2935                 <links/>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2939                 <retrieve/>
2940                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2941                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2942             </actions>
2943         </permacrud>
2944         </class>
2945         <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">
2946                 <fields oils_persist:primary="code">
2947                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2948                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2949                 </fields>
2950                 <links/>
2951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2952             <actions>
2953                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2954                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2955                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2956                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2957             </actions>
2958         </permacrud>
2959         </class>
2960         <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">
2961                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2962                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2963                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2964                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2965                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2966                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2967                 </fields>
2968                 <links>
2969             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2970         </links>
2971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2972             <actions>
2973                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2974                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2975                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2976                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2977             </actions>
2978         </permacrud>
2979         </class>
2980         <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">
2981                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
2982                         <field name="id" reporter:datatype="id" />
2983                         <field name="name" reporter:datatype="text"/>
2984                 </fields>
2985                 <links/>
2986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987             <actions>
2988                 <create permission="CREATE_LASSO" global_required="true"/>
2989                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
2990                 <update permission="UPDATE_LASSO" global_required="true"/>
2991                 <delete permission="DELETE_LASSO" global_required="true"/>
2992             </actions>
2993         </permacrud>
2994         </class>
2995         <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">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
2997                         <field name="id" reporter:datatype="id" />
2998                         <field name="lasso" reporter:datatype="link"/>
2999                         <field name="org_unit" reporter:datatype="org_unit"/>
3000                 </fields>
3001                 <links>
3002                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3003                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3004                 </links>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3008                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3009                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3010                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014         <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">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3016                         <field name="id" reporter:datatype="id" />
3017                         <field name="from_org" reporter:datatype="org_unit"/>
3018                         <field name="to_org" reporter:datatype="org_unit"/>
3019                         <field name="prox" reporter:datatype="int" />
3020                 </fields>
3021                 <links>
3022                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3023                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3024                 </links>
3025         </class>
3026         <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">
3027                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3028                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3029                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3030                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3031                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3032                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3033                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3034                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3035                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3036                 </fields>
3037                 <links/>
3038         </class>
3039         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3040                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3041                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3042                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3043                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3044                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3045                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3046                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3047                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3048                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3049                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3050                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3051                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3052                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3053                 </fields>
3054                 <links>
3055                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3056                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3057                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3058                 </links>
3059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3060             <actions>
3061                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3062                 <retrieve/>
3063                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3064                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3065             </actions>
3066         </permacrud>
3067         </class>
3068         <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">
3069                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3070                         <field name="address_type"  reporter:datatype="text"/>
3071                         <field name="city"  reporter:datatype="text"/>
3072                         <field name="country"  reporter:datatype="text"/>
3073                         <field name="county"  reporter:datatype="text"/>
3074                         <field name="id" reporter:datatype="id" />
3075                         <field name="org_unit" reporter:datatype="org_unit"/>
3076                         <field name="post_code"  reporter:datatype="text"/>
3077                         <field name="state"  reporter:datatype="text"/>
3078                         <field name="street1"  reporter:datatype="text"/>
3079                         <field name="street2"  reporter:datatype="text"/>
3080                         <field name="valid" reporter:datatype="bool"/>
3081                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3082                 </fields>
3083                 <links>
3084                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3085                 </links>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3089                 <retrieve/>
3090                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3091                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3092             </actions>
3093         </permacrud>
3094         </class>
3095         <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">
3096                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3097                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3098                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3099                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3100                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3101                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3102                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3103                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3104                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3105                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3106                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3107                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3108                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3109                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3110                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3111                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3112                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3113                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3114                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3115                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3116                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3117                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3118                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3119                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3120                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3121                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3122                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3123                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3124                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3125                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3126                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3127                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3128                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3129                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3130                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3131                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3132                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3133                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3134                 </fields>
3135                 <links>
3136                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3137                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3138                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3139                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3140                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3141                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3142                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3143                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3144                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3145                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3146                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3147                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3148                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3149                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3150                 </links>
3151         </class>
3152         <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">
3153                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3155                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3156                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3157                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3158                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3159                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3160                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3161                 </fields>
3162                 <links>
3163                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3164                 </links>
3165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3166                         <actions>
3167                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3168                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3169                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3170                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3171                         </actions>
3172                 </permacrud>
3173         </class>
3174         <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">
3175                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3176                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3177                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3178                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3179                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3180                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3181                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3182                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3183                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3184                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3185                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3186                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3187                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3188                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3189                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3190                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3197                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3198                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3199                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3202                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3203                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3204                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3205                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3206                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3207                 </fields>
3208                 <links>
3209                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3210                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3211                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3212                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3213                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3214                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3215                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3216                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3217                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3218                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3219                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3220                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3221                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3222                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3223                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3224                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3225                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3226                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3227                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3228                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3229                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3230                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3231                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3232                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3233                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3234                 </links>
3235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3236             <actions>
3237                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3238                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3239                     <context field="id"/>
3240                     <context field="parent_ou"/>
3241                                 </retrieve>
3242                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3243                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3244             </actions>
3245         </permacrud>
3246         </class>
3247         <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">
3248                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3249                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3250                         <field name="btype" reporter:datatype="text"/>
3251                         <field name="id" reporter:datatype="id" />
3252                         <field name="name"  reporter:datatype="text"/>
3253                         <field name="owner" reporter:datatype="link"/>
3254                         <field name="pub" reporter:datatype="bool"/>
3255                         <field name="create_time" reporter:datatype="timestamp" />
3256                 </fields>
3257                 <links>
3258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3259                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3260                 </links>
3261         </class>
3262         <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">
3263                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3264                         <field name="id" reporter:datatype="id" />
3265                         <field name="bucket" reporter:datatype="link"/>
3266                         <field name="note" reporter:datatype="text" />
3267                 </fields>
3268                 <links>
3269                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3270                 </links>
3271         </class>
3272         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3273                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3274                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3276                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3277                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3278                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3279                 </fields>
3280                 <links>
3281                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3282                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3283                 </links>
3284         </class>
3285         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3286                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3287                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3289                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3290                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3291                 </fields>
3292                 <links>
3293                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3294                 </links>
3295         </class>
3296         <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">
3297                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3298                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3299                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3301                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3302                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3303                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3304                 </fields>
3305                 <links>
3306                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3307                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3308                 </links>
3309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3310             <actions>
3311                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3312                 <retrieve />
3313                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3314                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3315             </actions>
3316         </permacrud>
3317         </class>
3318         <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">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3320                         <field name="field" reporter:datatype="link"/>
3321                         <field name="id" reporter:datatype="id" />
3322                         <field name="source" reporter:datatype="link"/>
3323                         <field name="value"  reporter:datatype="text"/>
3324                 </fields>
3325                 <links>
3326                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3327                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3328                 </links>
3329         </class>
3330         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3331                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3332                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3333                         <field name="btype" reporter:datatype="text"/>
3334                         <field name="id" reporter:datatype="id" />
3335                         <field name="name"  reporter:datatype="text"/>
3336                         <field name="owner" reporter:datatype="link"/>
3337                         <field name="pub" reporter:datatype="bool"/>
3338                         <field name="create_time" reporter:datatype="timestamp" />
3339                 </fields>
3340                 <links>
3341                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3342                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3343                 </links>
3344         </class>
3345         <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">
3346                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3347                         <field name="id" reporter:datatype="id" />
3348                         <field name="bucket" reporter:datatype="link"/>
3349                         <field name="note" reporter:datatype="text" />
3350                 </fields>
3351                 <links>
3352                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3353                 </links>
3354         </class>
3355         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3357                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3358                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3359                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3360                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3361                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3362                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3363                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3364                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3365                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3366                 </fields>
3367                 <links>
3368                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3369                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3370                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3371                 </links>
3372         </class>
3373         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3374                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3375                         <field name="id" reporter:datatype="id" />
3376                         <field name="ind1" />
3377                         <field name="ind2" />
3378                         <field name="record" />
3379                         <field name="subfield" />
3380                         <field name="tag" />
3381                         <field name="value" />
3382                 </fields>
3383                 <links>
3384                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3385                 </links>
3386         </class>
3387         <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">
3388                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3389                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3390                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3391                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3392                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3393                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3394                 </fields>
3395                 <links>
3396                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3397                 </links>
3398         </class>
3399         <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">
3400                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3401                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3402                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3403                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3404                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3405                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3406                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3407                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3408                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3409                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3410                 </fields>
3411                 <links>
3412                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3413                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3414                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3415                 </links>
3416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3417             <actions>
3418                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3419                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3420                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3421                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3422             </actions>
3423         </permacrud>
3424         </class>
3425         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3427                         <field name="create_date" reporter:datatype="timestamp"/>
3428                         <field name="creator" reporter:datatype="link"/>
3429                         <field name="edit_date" reporter:datatype="timestamp"/>
3430                         <field name="editor" reporter:datatype="link"/>
3431                         <field name="id" reporter:datatype="id" />
3432                         <field name="pub" reporter:datatype="bool"/>
3433                         <field name="record" reporter:datatype="link"/>
3434                         <field name="value"  reporter:datatype="text"/>
3435                 </fields>
3436                 <links>
3437                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3438                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3439                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3440                 </links>
3441         </class>
3442         <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">
3443                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3444                         <field name="balance_owed" reporter:datatype="money" />
3445                         <field name="total_owed" reporter:datatype="money" />
3446                         <field name="total_paid" reporter:datatype="money" />
3447                         <field name="usr" reporter:datatype="link"/>
3448                 </fields>
3449                 <links>
3450                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3451                 </links>
3452         </class>
3453         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3454                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3455                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3456                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3457                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3458                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3459                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3460                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3461                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3462                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3463                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3465                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3466                 </fields>
3467                 <links>
3468                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3469                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3470                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3471                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3472                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3473                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3474                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3475                 </links>
3476         </class>
3477         <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">
3478                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3479                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3480                         <field name="quality" reporter:datatype="int" />
3481                         <field name="source" reporter:datatype="text"/>
3482                         <field name="transcendant" reporter:datatype="bool"/>
3483                 </fields>
3484                 <links/>
3485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486             <actions>
3487                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3488                 <retrieve/>
3489                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3490                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3491             </actions>
3492         </permacrud>
3493         </class>
3494         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3496                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3497                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3498                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3499                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3500                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3501                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3502                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3503                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3504                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3505                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3506                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3507                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3508                 </fields>
3509                 <links>
3510                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3511                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3513                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3514                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3515                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3516                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3517                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3518                 </links>
3519         </class>
3520         <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">
3521                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3522                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3523                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3524                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3525                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3526                 </fields>
3527                 <links>
3528                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3529                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3530                 </links>
3531         </class>
3532         <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">
3533                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3534                         <field name="bucket" reporter:datatype="link"/>
3535                         <field name="id" reporter:datatype="id" />
3536                         <field name="target_user" reporter:datatype="link"/>
3537                         <field name="create_time" reporter:datatype="timestamp" />
3538                         <field name="pos" reporter:datatype="int" />
3539                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3540                 </fields>
3541                 <links>
3542                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3543                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3544             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3545                 </links>
3546         </class>
3547         <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">
3548                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3549                         <field name="id" reporter:datatype="id" />
3550                         <field name="item" reporter:datatype="link"/>
3551                         <field name="note" reporter:datatype="text" />
3552                 </fields>
3553                 <links>
3554                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3555                 </links>
3556         </class>
3557         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3558                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3559                         <field name="balance_owed" reporter:datatype="money" />
3560                         <field name="total_owed" reporter:datatype="money" />
3561                         <field name="total_paid" reporter:datatype="money" />
3562                         <field name="usr" reporter:datatype="link"/>
3563                 </fields>
3564                 <links>
3565                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3566                 </links>
3567         </class>
3568         <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">
3569                 <fields oils_persist:primary="code" oils_persist:sequence="">
3570                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3571                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3572                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3573                 </fields>
3574                 <links/>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3578                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3579                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3580                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3581             </actions>
3582         </permacrud>
3583         </class>
3584         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3585                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3586                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3587                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3588                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3589                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3590                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3591                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3592                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3593                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3594                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3595                 </fields>
3596                 <links>
3597                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3598                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3599                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3600                 </links>
3601         </class>
3602         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3604                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3605                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3606                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3607                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3608                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3609                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3610                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3611                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3612                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3613                 </fields>
3614                 <links>
3615                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3616                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3617                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3618                 </links>
3619         </class>
3620         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3621                 <fields oils_persist:primary="id" oils_persist:sequence="">
3622                         <field name="checkin_lib" reporter:datatype="link"/>
3623                         <field name="checkin_staff" reporter:datatype="link"/>
3624                         <field name="checkin_time" reporter:datatype="timestamp"/>
3625                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3626                         <field name="circ_staff" reporter:datatype="link"/>
3627                         <field name="desk_renewal" reporter:datatype="bool"/>
3628                         <field name="due_date" reporter:datatype="timestamp"/>
3629                         <field name="duration" reporter:datatype="interval"/>
3630                         <field name="duration_rule" reporter:datatype="link"/>
3631                         <field name="fine_interval" reporter:datatype="interval"/>
3632                         <field name="id" reporter:datatype="id" />
3633                         <field name="max_fine" reporter:datatype="money" />
3634                         <field name="max_fine_rule" reporter:datatype="link"/>
3635                         <field name="opac_renewal" reporter:datatype="bool"/>
3636                         <field name="phone_renewal" reporter:datatype="bool"/>
3637                         <field name="recurring_fine" reporter:datatype="money" />
3638                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3639                         <field name="renewal_remaining" reporter:datatype="int" />
3640                         <field name="stop_fines" reporter:datatype="text"/>
3641                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3642                         <field name="target_copy" reporter:datatype="link"/>
3643                         <field name="usr" reporter:datatype="link"/>
3644                         <field name="xact_finish" reporter:datatype="timestamp" />
3645                         <field name="xact_start" reporter:datatype="timestamp" />
3646                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3647                 </fields>
3648                 <links>
3649                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3650                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3651                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3652                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3653                 </links>
3654         </class>
3655         <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">
3656                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3657                         <field name="field" reporter:datatype="link"/>
3658                         <field name="id" reporter:datatype="id" />
3659                         <field name="source" reporter:datatype="link"/>
3660                         <field name="value" reporter:datatype="text"/>
3661                 </fields>
3662                 <links>
3663                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3664                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3665                 </links>
3666         </class>
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3669                         <field name="high" reporter:datatype="money" />
3670                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3671                         <field name="low" reporter:datatype="money" />
3672                         <field name="name" reporter:datatype="text"/>
3673                         <field name="normal" reporter:datatype="money" />
3674                         <field name="recurrence_interval" reporter:datatype="interval"/>
3675                 </fields>
3676                 <links/>
3677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3678             <actions>
3679                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3680                 <retrieve/>
3681                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3682                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3683             </actions>
3684         </permacrud>
3685         </class>
3686         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3687                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3688                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3689                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3690                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3691                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3692                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3693                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3694                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3695                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3696                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3697                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3698                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3699                 </fields>
3700                 <links>
3701                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3702                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3703                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3704                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3705                 </links>
3706         </class>
3707         <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">
3708                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3709                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3710                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3711                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3712                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3713                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3714                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3715                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3716                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3717                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3718                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3719                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3720                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3721                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3722                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3723                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3724                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3725                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3726                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3727                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3728                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3729                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3730                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3731                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3732                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3733                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3734                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3735                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3736                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3737                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3738                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3739                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3740                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3741                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3742                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3743                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3744                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3745                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3746                 </fields>
3747                 <links>
3748                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3749                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3750                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3751                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3752                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3753                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3754                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3755                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3756                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3757                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3758                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3759                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3760                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3761                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3762                 </links>
3763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764             <actions>
3765                 <create permission="CREATE_COPY">
3766                     <context link="call_number" field="owning_lib"/>
3767                 </create>
3768                 <retrieve/>
3769                 <update permission="UPDATE_COPY">
3770                     <context link="call_number" field="owning_lib"/>
3771                 </update>
3772                 <delete permission="DELETE_COPY">
3773                     <context link="call_number" field="owning_lib"/>
3774                 </delete>
3775             </actions>
3776         </permacrud>
3777         </class>
3778         <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">
3779                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3780                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3781                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3782                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3783                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3784                 </fields>
3785                 <links/>
3786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3787             <actions>
3788                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3789                 <retrieve/>
3790                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3791                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3792             </actions>
3793         </permacrud>
3794         </class>
3795         <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">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3797                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3798                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3799                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3800                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3801                 </fields>
3802                 <links/>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3806                 <retrieve/>
3807                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3808                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3809             </actions>
3810         </permacrud>
3811         </class>
3812         <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">
3813                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3814                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3815                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3816                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3817                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3818                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3819                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3820                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3821                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3822                 </fields>
3823                 <links>
3824                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3825                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3826                 </links>
3827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3828             <actions>
3829                 <create permission="CREATE_PERM" global_required="true"/>
3830                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3831                 <update permission="UPDATE_PERM" global_required="true"/>
3832                 <delete permission="DELETE_PERM" global_required="true"/>
3833             </actions>
3834         </permacrud>
3835         </class>
3836         <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">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3838                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3839                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3840                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3841                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3842                 </fields>
3843                 <links>
3844                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3845                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3846                 </links>
3847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3848             <actions>
3849                 <create permission="ADMIN_SURVEY">
3850                     <context link="question" jump="survey" field="owner"/>
3851                 </create>
3852                 <retrieve/>
3853                 <update permission="ADMIN_SURVEY">
3854                     <context link="question" jump="survey" field="owner"/>
3855                 </update>
3856                 <delete permission="ADMIN_SURVEY">
3857                     <context link="question" jump="survey" field="owner"/>
3858                 </delete>
3859             </actions>
3860         </permacrud>
3861         </class>
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3864                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3865                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3866                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3867                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3868                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3869                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3870                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3871                 </fields>
3872                 <links>
3873                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3874                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3875                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3876                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3877                 </links>
3878         </class>
3879         <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">
3880                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3881                         <field name="balance_owed" reporter:datatype="money" />
3882                         <field name="total_owed" reporter:datatype="money" />
3883                         <field name="total_paid" reporter:datatype="money" />
3884                         <field name="usr" reporter:datatype="link"/>
3885                 </fields>
3886                 <links>
3887                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3888                 </links>
3889         </class>
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3892                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3893                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3894                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3895                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3896                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3897                 </fields>
3898                 <links>
3899                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3900                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3901                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3902                 </links>
3903         </class>
3904         <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">
3905                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3906                         <field name="field" reporter:datatype="link"/>
3907                         <field name="id" reporter:datatype="id" />
3908                         <field name="source" reporter:datatype="link"/>
3909                         <field name="value" reporter:datatype="text"/>
3910                 </fields>
3911                 <links>
3912                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3913                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3914                 </links>
3915         </class>
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3918                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3919                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3920                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3921                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3922                 </fields>
3923                 <links>
3924                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3925                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3926                 </links>
3927         </class>
3928         <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">
3929                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3930                         <field name="depth" reporter:datatype="int" />
3931                         <field name="grantable" reporter:datatype="bool"/>
3932                         <field name="grp" reporter:datatype="link"/>
3933                         <field name="id" reporter:datatype="id" />
3934                         <field name="perm" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3938                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3939                 </links>
3940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3941             <actions>
3942                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3943                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3944                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3945                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3946             </actions>
3947         </permacrud>
3948         </class>
3949         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3950                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3951                         <field name="items" oils_persist:virtual="true" />
3952                         <field name="btype" reporter:datatype="text"/>
3953                         <field name="id" reporter:datatype="id" />
3954                         <field name="name" reporter:datatype="text"/>
3955                         <field name="owner" reporter:datatype="link"/>
3956                         <field name="pub" reporter:datatype="bool"/>
3957                         <field name="create_time" reporter:datatype="timestamp" />
3958                 </fields>
3959                 <links>
3960                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3961                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3962                 </links>
3963         </class>
3964         <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">
3965                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3966                         <field name="id" reporter:datatype="id" />
3967                         <field name="bucket" reporter:datatype="link"/>
3968                         <field name="note" reporter:datatype="text" />
3969                 </fields>
3970                 <links>
3971                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3972                 </links>
3973         </class>
3974         <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">
3975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3976                         <field name="id" reporter:datatype="int" />
3977                         <field name="usr" reporter:datatype="link"/>
3978                         <field name="work_ou" reporter:datatype="link"/>
3979                 </fields>
3980                 <links>
3981                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3982                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
3983                 </links>
3984         </class>
3985         <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">
3986                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
3987                         <field name="depth" reporter:datatype="int"/>
3988                         <field name="grantable" reporter:datatype="bool"/>
3989                         <field name="id" reporter:datatype="id" />
3990                         <field name="perm" reporter:datatype="link"/>
3991                         <field name="usr" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3995                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3996                 </links>
3997         </class>
3998         <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">
3999                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4000                         <field name="object_id" reporter:datatype="text"/>
4001                         <field name="grantable" reporter:datatype="bool"/>
4002                         <field name="id" reporter:datatype="id" />
4003                         <field name="perm" reporter:datatype="link"/>
4004                         <field name="usr" reporter:datatype="link"/>
4005                         <field name="object_type" reporter:datatype="text"/>
4006                 </fields>
4007                 <links>
4008                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4009                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4010                 </links>
4011         </class>
4012         <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">
4013                 <fields oils_persist:primary="id" oils_persist:sequence="">
4014                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4015                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4016                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4017                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4018                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4019                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4020                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4021                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4023                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4025                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4026                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4027                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4028                 </fields>
4029                 <links>
4030                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4031                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4032                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4033                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4034                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4035                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4036                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4037                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4038                 </links>
4039         </class>
4040         <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">
4041                 <fields oils_persist:primary="id" oils_persist:sequence="">
4042                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4043                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4044                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4045                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4046                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4047                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4048                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4049                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4050                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4051                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4052                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4053                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4054                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4055                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4056                 </fields>
4057                 <links>
4058                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4059                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4060                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4061                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4062                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4063                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4064                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4065                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4066                 </links>
4067         </class>
4068         <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">
4069                 <fields oils_persist:primary="id" oils_persist:sequence="">
4070                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4071                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4072                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4073                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4074                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4075                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4076                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4077                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4079                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4081                 </fields>
4082                 <links>
4083                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4084                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4085                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4086                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4087                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4088                 </links>
4089         </class>
4090         <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">
4091                 <fields oils_persist:primary="id" oils_persist:sequence="">
4092                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4093                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4094                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4095                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4096                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4097                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4098                         <field reporter:label="Accepting User" name="accepting_usr" />
4099                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4100                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4101                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4102                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4103                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4104                 </fields>
4105                 <links>
4106                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4107                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4108                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4109                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4110                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4111                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4112                 </links>
4113         </class>
4114         <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">
4115                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4116                         <field name="bucket" reporter:datatype="link"/>
4117                         <field name="id" reporter:datatype="id" />
4118                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4119                         <field name="create_time" reporter:datatype="timestamp" />
4120                         <field name="pos" reporter:datatype="int" />
4121                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4122                 </fields>
4123                 <links>
4124                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4125                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4126             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4127                 </links>
4128         </class>
4129         <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">
4130                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4131                         <field name="id" reporter:datatype="id" />
4132                         <field name="item" reporter:datatype="link"/>
4133                         <field name="note" reporter:datatype="text" />
4134                 </fields>
4135                 <links>
4136                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4137                 </links>
4138         </class>
4139         <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">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4141                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4142                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4143                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4144                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4145                 </fields>
4146                 <links>
4147                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4148                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4149                 </links>
4150         </class>
4151
4152         <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">
4153                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4154                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4155                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4156                 </fields>
4157                 <links/>
4158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4159             <actions>
4160                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4161                 <retrieve/>
4162                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4163                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4164             </actions>
4165         </permacrud>
4166         </class>
4167
4168
4169         <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">
4170                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4171                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4172                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4173                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4174                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4175                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4176                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4177                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4178                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4179                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4180                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4181                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4182                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4183                 </fields>
4184                 <links>
4185                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4186                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4187                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4188                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4189                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4190                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4191                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4192                 </links>
4193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4194             <actions>
4195                 <create permission="TRANSIT_COPY">
4196                     <context link="target_copy" field="owner"/>
4197                 </create>
4198                 <retrieve/>
4199                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4200                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4201             </actions>
4202         </permacrud>
4203         </class>
4204         <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">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4206                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4207                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4208                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4209                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4210                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4211                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4212                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4213                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4214                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4215                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4216                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4217                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4218                 </fields>
4219                 <links>
4220                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4221                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4222                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4223                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4224                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4225                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4226                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4227                 </links>
4228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4229             <actions>
4230                 <create permission="TRANSIT_COPY" context_field="owner">
4231                     <context link="target_copy" field="circ_lib"/>
4232                 </create>
4233                 <retrieve/>
4234                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4235                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4236             </actions>
4237         </permacrud>
4238         </class>
4239         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4240                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4241                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4242                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4243                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4244                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4245                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4246                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4247                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4248                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4249                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4250                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4251                 </fields>
4252                 <links>
4253                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4254                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4255                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4256                 </links>
4257         </class>
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4260                         <field name="grp" />
4261                         <field name="id" reporter:datatype="id" />
4262                         <field name="usr" />
4263                 </fields>
4264                 <links>
4265                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4266                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4267                 </links>
4268         </class>
4269         <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">
4270                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4271                         <field name="id" reporter:datatype="id" />
4272                         <field name="fq_field" reporter:datatype="text"/>
4273                         <field name="identity_value" reporter:datatype="text"/>
4274                         <field name="translation" reporter:datatype="text"/>
4275                         <field name="string" reporter:datatype="text"/>
4276                 </fields>
4277                 <links>
4278                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4279                 </links>
4280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4281             <actions>
4282                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4283                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4284                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4285                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4286             </actions>
4287         </permacrud>
4288         </class>
4289         <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">
4290                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4291                         <field name="id" reporter:datatype="id" />
4292                         <field name="fm_class" reporter:datatype="text"/>
4293                         <field name="field" reporter:datatype="text"/>
4294                         <field name="owner" reporter:datatype="org_unit"/>
4295                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4296                 </fields>
4297                 <links>
4298                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4299                 </links>
4300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4301             <actions>
4302                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4303                 <retrieve/>
4304                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4305                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4306             </actions>
4307         </permacrud>
4308         </class>
4309         <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">
4310                 <fields oils_persist:primary="code">
4311                         <field name="code" reporter:datatype="id" />
4312                         <field name="marc_code" reporter:datatype="text"/>
4313                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4314                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4315                 </fields>
4316                 <links/>
4317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4318             <actions>
4319                 <create permission="CREATE_LOCALE" global_required="true"/>
4320                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4321                 <update permission="UPDATE_LOCALE" global_required="true"/>
4322                 <delete permission="DELETE_LOCALE" global_required="true"/>
4323             </actions>
4324         </permacrud>
4325         </class>
4326         <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">
4327                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4328                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4329                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4330                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4331             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4332                 </fields>
4333                 <links>
4334                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4335                 </links>
4336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4337             <actions>
4338                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4339                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4340                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4341                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4342             </actions>
4343         </permacrud>
4344         </class>
4345
4346         <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">
4347                 <fields oils_persist:primary="id">
4348                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4349                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4350                 </fields>
4351                 <links/>
4352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4353             <actions>
4354                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4355                 <retrieve/>
4356                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4357                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4358             </actions>
4359         </permacrud>
4360         </class>
4361
4362         <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">
4363                 <fields oils_persist:primary="id">
4364                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4365                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4366                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4367                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4368                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4369                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4370                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4371                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4372                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4373                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4374                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4375                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4376                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4377                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4378                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4379                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4380                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4381                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4382                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4383                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4384                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4385                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4386                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4387                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4388                         <field reporter:label="Need Before Date" name="need_before" reporter:datatype="timestamp" />
4389                 </fields>
4390                 <links>
4391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4392                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4393                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4394                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4395                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4396                 </links>
4397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4398             <actions>
4399                 <create permission="user_request.create">
4400                     <context link="usr" field="home_ou"/>
4401                                 </create>
4402                 <retrieve permission="user_request.view">
4403                     <context link="usr" field="home_ou"/>
4404                                 </retrieve>
4405                 <update permission="user_request.update">
4406                     <context link="usr" field="home_ou"/>
4407                                 </update>
4408                 <delete permission="user_request.delete">
4409                     <context link="usr" field="home_ou"/>
4410                                 </delete>
4411             </actions>
4412         </permacrud>
4413         </class>
4414
4415         <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">
4416                 <fields oils_persist:primary="code">
4417                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4418                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4419                 </fields>
4420                 <links/>
4421         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4422             <actions>
4423                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4424                 <retrieve/>
4425                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4426                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4427             </actions>
4428         </permacrud>
4429         </class>
4430
4431         <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">
4432                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4433                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4434                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4435                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4436                         <field reporter:label="Ratio" name="ratio" />
4437                 </fields>
4438                 <links>
4439                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4440                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4441                 </links>
4442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4443                         <actions>
4444                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4445                                 <retrieve/>
4446                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4447                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4448                         </actions>
4449                 </permacrud>
4450         </class>
4451
4452         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4453                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4454                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4455                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4456                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4457                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4458                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4459                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4460                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4461                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4462                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4463                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4464                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4465                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4466                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4467                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4468                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4469                         <field reporter:label="Default Claim Interval" name="default_claim_interval" reporter:datatype="interval" />
4470                 </fields>
4471                 <links>
4472                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4473                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4474             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4475             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4476                 </links>
4477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4478             <actions>
4479                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4480                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4481                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4482                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4483             </actions>
4484         </permacrud>
4485         </class>
4486
4487         <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">
4488                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4489                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4490                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4491                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4492                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4493                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4494                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4495                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4496                 </fields>
4497                 <links>
4498                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4499                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4500                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4501                 </links>
4502         </class>
4503
4504         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4505                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4506                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4507                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4508                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4509                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4510                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4511                         <field reporter:label="Receive Method" name="receive_method" reporter:datatype="link" />
4512                         <field reporter:label="Invoice Type" name="invoice_type" reporter:datatype="text" />
4513                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4514                 </fields>
4515                 <links>
4516                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4517                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4518                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4519                         <link field="receive_method" reltype="has_a" key="id" map="" class="acqim"/>
4520                 </links>
4521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4522             <actions>
4523                 <create   permission="ADMIN_INVOICE" context_field="receiver"/>
4524                 <retrieve permission="ADMIN_INVOICE" context_field="receiver"/>
4525                 <update   permission="ADMIN_INVOICE" context_field="receiver"/>
4526                 <delete   permission="ADMIN_INVOICE" context_field="receiver"/>
4527             </actions>
4528         </permacrud>
4529         </class>
4530
4531         <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">
4532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
4533                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4534                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4535                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4536                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
4537                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
4538                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
4539                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4540                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
4541                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4542                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4543                 </fields>
4544                 <links>
4545                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4546                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4547                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4548                 </links>
4549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4550             <actions>
4551                 <create   permission="ADMIN_INVOICE">
4552                                         <context link="invoice" field="receiver"/>
4553                                 </create>
4554                 <retrieve permission="ADMIN_INVOICE">
4555                                         <context link="invoice" field="receiver"/>
4556                                 </retrieve>
4557                 <update   permission="ADMIN_INVOICE">
4558                                         <context link="invoice" field="receiver"/>
4559                                 </update>
4560                                 <delete   permission="ADMIN_INVOICE">
4561                                         <context link="invoice" field="receiver"/>
4562                                 </delete>
4563             </actions>
4564         </permacrud>
4565         </class>
4566
4567         <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">
4568                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
4569                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4570                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4571                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4572                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
4573                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
4574                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
4575                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4576                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4577                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
4578                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
4579                 </fields>
4580                 <links>
4581                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
4582                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4583                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4584                 </links>
4585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4586             <actions>
4587                 <create   permission="ADMIN_INVOICE">
4588                                         <context link="invoice" field="receiver"/>
4589                                 </create>
4590                 <retrieve permission="ADMIN_INVOICE">
4591                                         <context link="invoice" field="receiver"/>
4592                                 </retrieve>
4593                 <update   permission="ADMIN_INVOICE">
4594                                         <context link="invoice" field="receiver"/>
4595                                 </update>
4596                                 <delete   permission="ADMIN_INVOICE">
4597                                         <context link="invoice" field="receiver"/>
4598                                 </delete>
4599             </actions>
4600         </permacrud>
4601         </class>
4602
4603         <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">
4604                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4605                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4606                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4607                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4608                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4609                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4610                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4611                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4612                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4613                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4614                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4615                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4616                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4617                 </fields>
4618                 <links>
4619                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4620                 </links>
4621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4622             <actions>
4623                 <create permission="ADMIN_PROVIDER">
4624                     <context link="provider" field="owner"/>
4625                 </create>
4626                 <retrieve permission="ADMIN_PROVIDER">
4627                     <context link="provider" field="owner"/>
4628                 </retrieve>
4629                 <update permission="ADMIN_PROVIDER">
4630                     <context link="provider" field="owner"/>
4631                 </update>
4632                 <delete permission="ADMIN_PROVIDER">
4633                     <context link="provider" field="owner"/>
4634                 </delete>
4635             </actions>
4636         </permacrud>
4637         </class>
4638
4639         <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">
4640                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4641                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4642                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4643                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4644                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4645                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4646                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4647         </fields>
4648                 <links>
4649                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4650                 </links>
4651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4652             <actions>
4653                 <create permission="ADMIN_PROVIDER">
4654                     <context link="provider" field="owner"/>
4655                 </create>
4656                 <retrieve permission="ADMIN_PROVIDER">
4657                     <context link="provider" field="owner"/>
4658                 </retrieve>
4659                 <update permission="ADMIN_PROVIDER">
4660                     <context link="provider" field="owner"/>
4661                 </update>
4662                 <delete permission="ADMIN_PROVIDER">
4663                     <context link="provider" field="owner"/>
4664                 </delete>
4665             </actions>
4666         </permacrud>
4667     </class>
4668         <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">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4670                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4671                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4672                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4673                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4674                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4675                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4676                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4677                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4678                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4679                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4680                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4681                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
4682                 </fields>
4683                 <links>
4684                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4685                 </links>
4686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4687             <actions>
4688                 <create permission="ADMIN_PROVIDER">
4689                     <context link="contact" jump='provider' field="owner"/>
4690                 </create>
4691                 <retrieve permission="ADMIN_PROVIDER">
4692                     <context link="contact" jump='provider' field="owner"/>
4693                 </retrieve>
4694                 <update permission="ADMIN_PROVIDER">
4695                     <context link="contact" jump='provider' field="owner"/>
4696                 </update>
4697                 <delete permission="ADMIN_PROVIDER">
4698                     <context link="contact" jump='provider' field="owner"/>
4699                 </delete>
4700             </actions>
4701         </permacrud>
4702         </class>
4703
4704         <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">
4705                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
4706                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
4707                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
4708                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
4709                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
4710                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
4711                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
4712                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
4713                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4714                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
4715                 </fields>
4716                 <links>
4717                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
4718                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
4719                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
4720                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
4721                 </links>
4722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4723                 </permacrud>
4724         </class>
4725
4726         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4727                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4728                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4729                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4730                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4731                 </fields>
4732                 <links>
4733             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4734                 </links>
4735                 <!--
4736                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4737                         But here's what it should look like if we ever do use pcrud.
4738                 -->
4739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4740                         <actions>
4741                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4742                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4743                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4744                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4745                         </actions>
4746                 </permacrud>
4747         </class>
4748
4749         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4751                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4752                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4753                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4754                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4755                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4756                 </fields>
4757                 <links>
4758                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4759                 </links>
4760                 <!--
4761                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4762                         But here's what it should look like if we ever do use pcrud.
4763                 -->
4764                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4765                         <actions>
4766                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4767                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4768                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4769                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4770                         </actions>
4771                 </permacrud>
4772         </class>
4773
4774         <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">
4775                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4776                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4777                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4778                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4779                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4780                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4781                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4782                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4783                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4784                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4785                 </fields>
4786                 <links>
4787                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4788                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4789             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4790             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4791                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4792                 </links>
4793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4794             <actions>
4795                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4796                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4797                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4798                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4799             </actions>
4800         </permacrud>
4801         </class>
4802
4803         <class id="acqfscred" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
4804                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4805                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4806                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4807                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4808                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4809                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
4810                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
4811                 </fields>
4812                 <links>
4813                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4814                 </links>
4815         </class>
4816
4817         <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">
4818                 <fields oils_persist:primary="id">
4819                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
4820                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
4821                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
4822                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
4823                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
4824                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4825                 </fields>
4826                 <links>
4827                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4828                 </links>
4829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4830                 </permacrud>
4831         </class>
4832
4833         <class id="acqfdeb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
4834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4835                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4836                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4837                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4838                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4839                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4840                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
4841                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4842                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4843                 </fields>
4844                 <links>
4845                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4846                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4847                 </links>
4848         </class>
4849
4850         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
4851                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
4852                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4853                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4854                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4855                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4856                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4857                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4858                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
4859                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
4860                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4861                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
4862                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
4863                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4864                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4865                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4866                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4867                 </fields>
4868                 <links>
4869                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4870                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4871             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4872             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4873             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4874                 </links>
4875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4876             <actions>
4877                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4878                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4879                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4880                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4881             </actions>
4882         </permacrud>
4883         </class>
4884
4885         <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">
4886                 <fields oils_persist:primary="fund">
4887                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4888                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4889                 </fields>
4890                 <links>
4891                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4892                 </links>
4893         </class>
4894
4895         <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">
4896                 <fields oils_persist:primary="fund">
4897                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4898                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4899                 </fields>
4900                 <links>
4901                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4902                 </links>
4903         </class>
4904
4905         <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">
4906                 <fields oils_persist:primary="fund">
4907                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4908                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4909                 </fields>
4910                 <links>
4911                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4912                 </links>
4913         </class>
4914
4915         <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">
4916                 <fields oils_persist:primary="fund">
4917                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4918                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4919                 </fields>
4920                 <links>
4921                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4922                 </links>
4923         </class>
4924
4925         <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">
4926                 <fields oils_persist:primary="fund">
4927                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4928                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4929                 </fields>
4930                 <links>
4931                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4932                 </links>
4933         </class>
4934
4935    <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">
4936         <fields oils_persist:primary="fund">
4937             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4938             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4939         </fields>
4940         <links>
4941             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4942         </links>
4943     </class>
4944
4945    <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">
4946         <fields oils_persist:primary="fund">
4947             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4948             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
4949         </fields>
4950         <links>
4951             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4952         </links>
4953     </class>
4954
4955    <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">
4956         <fields oils_persist:primary="fund">
4957             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4958             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4959         </fields>
4960         <links>
4961             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4962         </links>
4963     </class>
4964
4965    <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">
4966         <fields oils_persist:primary="fund">
4967             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4968             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
4969         </fields>
4970         <links>
4971             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4972         </links>
4973     </class>
4974
4975    <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">
4976         <fields oils_persist:primary="fund">
4977             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4978             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
4979         </fields>
4980         <links>
4981             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4982         </links>
4983     </class>
4984
4985         <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">
4986                 <fields oils_persist:primary="funding_source">
4987                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4988                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
4989                 </fields>
4990                 <links>
4991                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4992                 </links>
4993         </class>
4994
4995         <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">
4996                 <fields oils_persist:primary="funding_source">
4997                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4998                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
4999                 </fields>
5000                 <links>
5001                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5002                 </links>
5003         </class>
5004
5005         <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">
5006                 <fields oils_persist:primary="funding_source">
5007                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5008                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5009                 </fields>
5010                 <links>
5011                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5012                 </links>
5013         </class>
5014
5015         <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">
5016                 <fields oils_persist:primary="fund">
5017                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5018                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5019                 </fields>
5020                 <links>
5021                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5022                 </links>
5023         </class>
5024
5025         <class id="acqfa" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
5026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5027                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5028                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5029                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5030                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5031                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5032                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5033                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5034                 </fields>
5035                 <links>
5036                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5037                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5038                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5039                 </links>
5040         </class>
5041
5042     <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">
5043         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5044             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5045             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5046             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5047             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5048             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5049             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5050             <field reporter:label="Note" name="note" reporter:datatype="text" />
5051             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5052         </fields>
5053         <links>
5054             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5055             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5056             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5057         </links>
5058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5059                         <actions>
5060                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5061                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5062                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5063                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5064                         </actions>
5065                 </permacrud>
5066     </class>
5067
5068         <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">
5069                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5070                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
5071                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5072                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
5073                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5074                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5075                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5076                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5077                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5078                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5079                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5080                 </fields>
5081                 <links>
5082                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5083                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5084                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5085                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5086                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5087                 </links>
5088         </class>
5089
5090         <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">
5091                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5092                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5093                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5094                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5095                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5096                 </fields>
5097                 <links>
5098                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5099                 </links>
5100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5101                 </permacrud>
5102         </class>
5103
5104         <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">
5105                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5106                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
5107                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5108                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5109                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5110                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5111                         <field reporter:label="State" name="state" reporter:datatype="text" />
5112                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5113                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5114                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5115                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5116                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5117                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5118                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5119                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5120                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
5121                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5122                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5123                 </fields>
5124                 <links>
5125                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5126                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5127                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5128                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5129                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5130                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5131                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5132                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5133                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5134                 </links>
5135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5136                         <actions>
5137                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5138                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5139                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5140                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5141                         </actions>
5142                 </permacrud>
5143         </class>
5144
5145         <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">
5146                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5147                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5148                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5150                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5151                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5152                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5153                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5154                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5155                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5157                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5158                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5159                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5161                 </fields>
5162                 <links>
5163                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5164                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5165                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5166                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5167                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5168                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5169                 </links>
5170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5171             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5172                 </permacrud>
5173         </class>
5174
5175         <class id="acqpon" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
5176                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5177                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5178                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5179                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5180                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5181                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5182                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5183                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5184                 </fields>
5185                 <links>
5186                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5187                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5189                 </links>
5190         </class>
5191
5192         <class id="jub" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5193                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5194                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5195                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5196                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
5197                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5198                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5199                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5200                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5201                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5202                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5203                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5204                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5205                         <field reporter:label="State" name="state" reporter:datatype="text" />
5206                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5207                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5208                         <field reporter:label="Claim Interval" name="claim_interval" reporter:datatype="interval" />
5209                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5210                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5211                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5212                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5213                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5214                 </fields>
5215                 <links>
5216                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5217                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5218                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5219                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5220                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5221                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5222                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5223                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5224                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5225                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5226                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5227                 </links>
5228         </class>
5229
5230         <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">
5231                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5232                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5233                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5234                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5235                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5236                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5237                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5238                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5239                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5240                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5241                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link"/>
5242                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5243                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5244                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5245                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5246                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5247                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5248                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5249                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5250                 </fields>
5251                 <links>
5252                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5253                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5254                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5255                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5256                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5257                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5258                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5259                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5260                 </links>
5261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5262             <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5263                 <context link="purchase_order" field="ordering_agency"/>
5264                 <context link="picklist" field="org_unit"/>
5265             </retrieve>
5266                 </permacrud>
5267         </class>
5268
5269         <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">
5270                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5271                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5272                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5273                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5274                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5275                 </fields>
5276                 <links>
5277                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5278                 </links>
5279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5280                         <actions>
5281                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5282                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5283                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5284                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5285                         </actions>
5286                 </permacrud>
5287         </class>
5288
5289         <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">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5291                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5292                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5293                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5294                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5295                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5296                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5297                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5298                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5299                 </fields>
5300                 <links>
5301                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5302                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5303                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5304                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5305                 </links>
5306         </class>
5307
5308         <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">
5309                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5310                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5311                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5312                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5313                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5314                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5315                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5316                 </fields>
5317                 <links>
5318                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5319                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5320                 </links>
5321         </class>
5322
5323         <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">
5324                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5325                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5326                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5327                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5328                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5329                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5330                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5331                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5332                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5333                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5335                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5336                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5337                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5338                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5339                 </fields>
5340                 <links>
5341                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5342                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5343                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5344                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5345                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5346                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5347                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5348                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5349                 </links>
5350         </class>
5351
5352         <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">
5353                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5354                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5355                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5356                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5357                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5358                 </fields>
5359                 <links/>
5360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5361                         <actions>
5362                                 <retrieve />
5363                         </actions>
5364                 </permacrud>
5365         </class>
5366
5367         <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">
5368                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5369                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5370                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5372                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5373                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5374             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5375                 </fields>
5376                 <links/>
5377         <permacrud>
5378             <actions>
5379                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5380                 <retrieve />
5381                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5382                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5383             </actions>
5384         </permacrud>
5385         </class>
5386
5387         <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">
5388                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5389                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5390                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5391                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5392                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5393                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5394                 </fields>
5395                 <links/>
5396         </class>
5397         <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">
5398                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5399                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5400                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5401                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5402                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5403                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5404                 </fields>
5405                 <links>
5406                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5407                 </links>
5408         </class>
5409
5410         <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">
5411             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5412                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5413                 <field reporter:label="Code" name="code" reporter:datatype="text" />
5414                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5415                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5416                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5417                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5418         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5419
5420             </fields>
5421             <links>
5422                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5423             </links>
5424             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5425                 <actions>
5426                     <create permission="ADMIN_PROVIDER">
5427                         <context link="provider" field="owner"/>
5428                     </create>
5429                     <retrieve permission="ADMIN_PROVIDER">
5430                         <context link="provider" field="owner"/>
5431                     </retrieve>
5432                     <update permission="ADMIN_PROVIDER">
5433                         <context link="provider" field="owner"/>
5434                     </update>
5435                     <delete permission="ADMIN_PROVIDER">
5436                         <context link="provider" field="owner"/>
5437                     </delete>
5438                 </actions>
5439             </permacrud>
5440         </class>
5441         
5442         <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">
5443             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
5444                 <field reporter:label="ID" name="id" reporter:datatype="id" />
5445                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5446                 <field reporter:label="Name" name="name" reporter:datatype="text" />
5447                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
5448             </fields>
5449             <links>
5450                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5451             </links>
5452             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5453                 <actions>
5454                     <create permission="ADMIN_PROVIDER">
5455                         <context link="provider" field="owner"/>
5456                     </create>
5457                     <retrieve permission="ADMIN_PROVIDER">
5458                         <context link="provider" field="owner"/>
5459                     </retrieve>
5460                     <update permission="ADMIN_PROVIDER">
5461                         <context link="provider" field="owner"/>
5462                     </update>
5463                     <delete permission="ADMIN_PROVIDER">
5464                         <context link="provider" field="owner"/>
5465                     </delete>
5466                 </actions>
5467             </permacrud>
5468         </class>
5469         
5470         <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">
5471             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5472                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5473                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5474                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5475                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5476                 </fields>
5477                 <links/>
5478         </class>
5479
5480         <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">
5481                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
5482                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID"/>
5483                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
5484                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
5485                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
5486                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
5487                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
5488                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
5489                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
5490                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
5491                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
5492                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
5493                 </fields>
5494                 <links>
5495                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5496                 </links>
5497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5498             <actions>
5499                 <create permission="ADMIN_PROVIDER">
5500                     <context link="provider" field="owner"/>
5501                 </create>
5502                 <retrieve permission="ADMIN_PROVIDER">
5503                     <context link="provider" field="owner"/>
5504                 </retrieve>
5505                 <update permission="ADMIN_PROVIDER">
5506                     <context link="provider" field="owner"/>
5507                 </update>
5508                 <delete permission="ADMIN_PROVIDER">
5509                     <context link="provider" field="owner"/>
5510                 </delete>
5511             </actions>
5512         </permacrud>
5513         </class>
5514
5515         <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">
5516                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
5517                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
5518                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
5519                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
5520                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
5521                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
5522                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
5523                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
5524                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
5525                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
5526                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
5527                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
5528                 </fields>
5529                 <links>
5530                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
5531                 </links>
5532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5533             <actions>
5534                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5535                     <context link="account" jump="provider" field="owner"/>
5536                 </retrieve>
5537                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5538                     <context link="account" jump="provider" field="owner"/>
5539                 </update>
5540                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
5541                     <context link="account" jump="provider" field="owner"/>
5542                 </delete>
5543             </actions>
5544         </permacrud>
5545         </class>
5546
5547
5548         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
5549                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
5550                         <field name="id" reporter:datatype="id" />
5551                         <field name="parent" reporter:datatype="link"/>
5552                         <field name="owner" reporter:datatype="link"/>
5553                         <field name="create_time" reporter:datatype="timestamp"/>
5554                         <field name="name" reporter:datatype="text"/>
5555                         <field name="shared" reporter:datatype="bool"/>
5556                         <field name="share_with" reporter:datatype="link"/>
5557                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5558                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
5559                 </fields>
5560                 <links>
5561                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5562                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
5563                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
5564                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5565                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
5566                 </links>
5567         </class>
5568         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
5569                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
5570                         <field name="id" reporter:datatype="id" />
5571                         <field name="parent" reporter:datatype="link"/>
5572                         <field name="owner" reporter:datatype="link"/>
5573                         <field name="create_time" reporter:datatype="timestamp"/>
5574                         <field name="name" reporter:datatype="text"/>
5575                         <field name="shared" reporter:datatype="bool"/>
5576                         <field name="share_with" reporter:datatype="link"/>
5577                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5578                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
5579                 </fields>
5580                 <links>
5581                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5582                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
5583                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
5584                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5585                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
5586                 </links>
5587         </class>
5588         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
5589                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
5590                         <field name="id" reporter:datatype="id" />
5591                         <field name="parent" reporter:datatype="link"/>
5592                         <field name="owner" reporter:datatype="link"/>
5593                         <field name="create_time" reporter:datatype="timestamp"/>
5594                         <field name="name" reporter:datatype="text"/>
5595                         <field name="shared" reporter:datatype="bool"/>
5596                         <field name="share_with" reporter:datatype="link"/>
5597                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5599                 </fields>
5600                 <links>
5601                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5602                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
5603                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
5604                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5605                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
5606                 </links>
5607         </class>
5608         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
5609                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
5610                         <field name="id" reporter:datatype="id" />
5611                         <field name="owner" reporter:datatype="link"/>
5612                         <field name="create_time" reporter:datatype="timestamp"/>
5613                         <field name="name" reporter:datatype="text"/>
5614                         <field name="data" reporter:datatype="text"/>
5615                         <field name="folder" reporter:datatype="link"/>
5616                         <field name="description" reporter:datatype="text"/>
5617                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5618                 </fields>
5619                 <links>
5620                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5621                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
5622                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
5623                 </links>
5624         </class>
5625         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
5626                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
5627                         <field name="id" reporter:datatype="id" />
5628                         <field name="owner" reporter:datatype="link"/>
5629                         <field name="create_time" reporter:datatype="timestamp"/>
5630                         <field name="template" reporter:datatype="link"/>
5631                         <field name="data" reporter:datatype="link"/>
5632                         <field name="folder" reporter:datatype="link"/>
5633                         <field name="recur" reporter:datatype="bool"/>
5634                         <field name="recurrence" reporter:datatype="interval"/>
5635                         <field name="name" reporter:datatype="text"/>
5636                         <field name="description" reporter:datatype="text"/>
5637                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
5638                 </fields>
5639                 <links>
5640                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5641                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
5642                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
5643                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5644                 </links>
5645         </class>
5646         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5647                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5648                         <field name="id" reporter:datatype="id" />
5649                         <field name="runner" reporter:datatype="link"/>
5650                         <field name="start_time" reporter:datatype="timestamp"/>
5651                         <field name="complete_time" reporter:datatype="timestamp"/>
5652                         <field name="run_time" reporter:datatype="timestamp"/>
5653                         <field name="email" reporter:datatype="text"/>
5654                         <field name="excel_format" reporter:datatype="bool"/>
5655                         <field name="csv_format" reporter:datatype="bool"/>
5656                         <field name="html_format" reporter:datatype="bool"/>
5657                         <field name="error_code" reporter:datatype="int"/>
5658                         <field name="error_text" reporter:datatype="text"/>
5659                         <field name="report" reporter:datatype="link"/>
5660                         <field name="folder" reporter:datatype="link"/>
5661                         <field name="chart_pie" reporter:datatype="bool"/>
5662                         <field name="chart_bar" reporter:datatype="bool"/>
5663                         <field name="chart_line" reporter:datatype="bool"/>
5664                 </fields>
5665                 <links>
5666                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5667                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5668                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5669                 </links>
5670         </class>
5671         <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">
5672                 <fields oils_persist:primary="id">
5673                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5674                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5675                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5676                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5677                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5678                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5679                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5680                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5681                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5682                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5683                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5684                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5685                 </fields>
5686                 <links>
5687                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5688                 </links>
5689         </class>
5690         <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">
5691                 <fields oils_persist:primary="id">
5692                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5693                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5694                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5695                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5696                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5697                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5698                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5699                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5700                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5701                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5702                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5703                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5704                 </fields>
5705                 <links>
5706                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5707                 </links>
5708         </class>
5709         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5710                 <fields oils_persist:primary="id">
5711                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5712                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5713                         <field reporter:label="Fingerprint" name="fingerprint" />
5714                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5715                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5716                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5717                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5718                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5719                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5720                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5721                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5722                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5723                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5724                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5725                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5726                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5727                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5728                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5729                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5730                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5731                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5732                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5733                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5734                 </fields>
5735                 <links>
5736                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5737                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5738                 </links>
5739         </class>
5740         <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">
5741                 <fields oils_persist:primary="id">
5742                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5743                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5744                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5745                 </fields>
5746                 <links>
5747                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5748                 </links>
5749         </class>
5750         <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">
5751                 <fields oils_persist:primary="id">
5752                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5753                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5754                 </fields>
5755                 <links>
5756                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5757                 </links>
5758         </class>
5759         <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">
5760                 <fields oils_persist:primary="id">
5761                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5762                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5763                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5764                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5765                 </fields>
5766                 <links>
5767                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5768                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5769                 </links>
5770         </class>
5771         <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">
5772                 <fields oils_persist:primary="xact">
5773                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5774                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5775                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5776                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5777                 </fields>
5778                 <links>
5779                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5780                 </links>
5781         </class>
5782         <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">
5783                 <fields oils_persist:primary="xact">
5784                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5785                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
5786                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
5787                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
5788                 </fields>
5789                 <links>
5790                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5791                 </links>
5792         </class>
5793         <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)">
5794                 <fields oils_persist:primary="id">
5795                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
5796                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
5797                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
5798                 </fields>
5799                 <links>
5800                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
5801                 </links>
5802         </class>
5803         <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">
5804                 <fields oils_persist:primary="id">
5805                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
5806                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
5807                 </fields>
5808                 <links>
5809                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
5810                 </links>
5811         </class>
5812         <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">
5813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
5814                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
5815                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
5816                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
5817                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
5818                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5819                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
5820                 </fields>
5821                 <links>
5822                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5823                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
5824                 </links>
5825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5826                         <actions>
5827                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5828                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5829                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5830                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5831                         </actions>
5832                 </permacrud>
5833         </class>
5834         <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">
5835                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
5836                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
5837                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
5838                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
5839                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5840                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5841                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5842                 </fields>
5843                 <links>
5844                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5845                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5846                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5847                 </links>
5848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5849                         <actions>
5850                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
5851                                         <context link="formula" field="owner"/>
5852                                 </create>
5853                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
5854                                         <context link="formula" field="owner"/>
5855                                 </retrieve>
5856                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
5857                                         <context link="formula" field="owner"/>
5858                                 </update>
5859                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
5860                                         <context link="formula" field="owner"/>
5861                                 </delete>
5862                         </actions>
5863                 </permacrud>
5864         </class>
5865
5866         <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">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
5868                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5869                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5870                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5871                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
5872                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
5873                 </fields>
5874                 <links>
5875                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5876                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5877                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5878                 </links>
5879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5880                         <actions>
5881                                 <create permission="CREATE_PURCHASE_ORDER">
5882                                         <context link="formula" field="owner"/>
5883                 </create>
5884                                 <retrieve permission="CREATE_PURCHASE_ORDER">
5885                                         <context link="formula" field="owner"/>
5886                 </retrieve>
5887                                 <update permission="CREATE_PURCHASE_ORDER">
5888                                         <context link="formula" field="owner"/>
5889                 </update>
5890                                 <delete permission="CREATE_PURCHASE_ORDER">
5891                                         <context link="formula" field="owner"/>
5892                 </delete>
5893                         </actions>
5894                 </permacrud>
5895         </class>
5896
5897         <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">
5898                 <fields oils_persist:primary="id">
5899                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
5900                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5901                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
5902                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
5903                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
5904                 </fields>
5905                 <links>
5906                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5907                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5908                 </links>
5909                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5910                 </permacrud>
5911         </class>
5912
5913     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
5914         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
5915             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5916             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5917             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5918             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
5919             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5920             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
5921             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
5922             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
5923             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
5924             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
5925             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
5926             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
5927             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
5928             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
5929             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5930         </fields>
5931     </class>
5932
5933     <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">
5934         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
5935             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5936             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5937             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5938             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5939             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5940         </fields>
5941     </class>
5942
5943     <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">
5944         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
5945             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5946             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5947             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5948             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5949             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5950             <field reporter:label="City" name="city" reporter:datatype="text"/>
5951             <field reporter:label="State" name="state" reporter:datatype="text"/>
5952             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5953             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5954             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5955         </fields>
5956     </class>
5957
5958     <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">
5959         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
5960             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5961             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5962             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5963             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5964             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5965             <field reporter:label="City" name="city" reporter:datatype="text"/>
5966             <field reporter:label="State" name="state" reporter:datatype="text"/>
5967             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5968             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5969             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5970         </fields>
5971     </class>
5972
5973     <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">
5974         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
5975             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5976             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5977             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5978             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
5979             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
5980             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5981         </fields>
5982     </class>
5983
5984     <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">
5985                 <oils_persist:source_definition>
5986
5987             SELECT  u.hold,
5988                     c.circ_lib,
5989                     count(*)
5990               FROM  action.unfulfilled_hold_list u
5991                     JOIN asset.copy c ON (c.id = u.current_copy)
5992               GROUP BY 1,2
5993
5994                 </oils_persist:source_definition>
5995         <fields>
5996             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5997             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5998             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5999         </fields>
6000                 <links>
6001                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6002                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6003                 </links>
6004     </class>
6005
6006     <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">
6007                 <oils_persist:source_definition>
6008
6009             SELECT  hold,
6010                     min(count)
6011               FROM  action.unfulfilled_hold_loops
6012               GROUP BY 1
6013
6014                 </oils_persist:source_definition>
6015         <fields>
6016             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6017             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6018         </fields>
6019                 <links>
6020                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6021                 </links>
6022     </class>
6023
6024     <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">
6025                 <oils_persist:source_definition>
6026
6027             SELECT  DISTINCT l.*
6028               FROM  action.unfulfilled_hold_loops l
6029                     JOIN action.unfulfilled_hold_min_loop m USING (hold)
6030               WHERE l.count = m.min
6031
6032                 </oils_persist:source_definition>
6033         <fields>
6034             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6035             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6036             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6037         </fields>
6038                 <links>
6039                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6040                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6041                 </links>
6042     </class>
6043
6044     <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">
6045                 <oils_persist:source_definition>
6046
6047             SELECT  hold,
6048                     max(count)
6049               FROM  action.unfulfilled_hold_loops
6050               GROUP BY 1
6051
6052                 </oils_persist:source_definition>
6053         <fields>
6054             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6055             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6056         </fields>
6057                 <links>
6058                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6059                 </links>
6060     </class>
6061
6062     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:tablename="action.unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6063                 <oils_persist:source_definition>
6064
6065             SELECT  DISTINCT l.*
6066               FROM  action.unfulfilled_hold_loops l
6067                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6068               WHERE l.count = m.max
6069
6070                 </oils_persist:source_definition>
6071         <fields>
6072             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6073             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6074             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6075         </fields>
6076                 <links>
6077                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6078                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6079                 </links>
6080     </class>
6081
6082         <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">
6083                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6084                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6085                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6086                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6087                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6088                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
6089                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
6090                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
6091                 </fields>
6092                 <links>
6093                 </links>
6094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6095                 </permacrud>
6096         </class>
6097
6098         <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">
6099                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6100                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6101                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6102                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6103                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6104                 </fields>
6105                 <links>
6106                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6107                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6108                 </links>
6109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6110                 </permacrud>
6111         </class>
6112
6113         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6114                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6115                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6116                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6117                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6118                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6119                 </fields>
6120                 <links>
6121                 </links>
6122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6123                 </permacrud>
6124         </class>
6125
6126         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6127                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6128                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6129                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6130                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6131                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6132                 </fields>
6133                 <links>
6134                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6135                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6136                 </links>
6137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6138                 </permacrud>
6139         </class>
6140         
6141         <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">
6142                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6143                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6144                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6145                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6146                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6147                 </fields>
6148                 <links>
6149                         <link field="return_type" reltype="might_have" key="id" map="" class="qdt"/>
6150                 </links>
6151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6152                 </permacrud>
6153         </class>
6154         
6155         <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">
6156                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6157                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6158                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6159                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6160                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6161                 </fields>
6162                 <links>
6163                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6164                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6165                 </links>
6166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6167                 </permacrud>
6168         </class>
6169
6170         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6171                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6172                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6173                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6174                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6175                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6176                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6177                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6178                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6179                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6180                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6181                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6182                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6183                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6184                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6185                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6186                 </fields>
6187                 <links>
6188                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6189                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6190                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6191                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6192                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6193                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
6194                 </links>
6195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6196                 </permacrud>
6197         </class>
6198
6199         <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">
6200                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6201                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6202                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6203                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6204                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6205                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6206                 </fields>
6207                 <links>
6208                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6209                         <link field="condition" reltype="might_have" key="id" map="" class="qxp"/>
6210                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6211                 </links>
6212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6213                 </permacrud>
6214         </class>
6215
6216         <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">
6217                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6218                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6219                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6220                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6221                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6222                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6223                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6224                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6225                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6226                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6227                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
6228                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
6229                 </fields>
6230                 <links>
6231                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6232                         <link field="function_call" reltype="might_have" key="id" map="" class="qxp"/>
6233                         <link field="parent_relation" reltype="might_have" key="id" map="" class="qfr"/>
6234                         <link field="on_clause" reltype="might_have" key="id" map="" class="qxp"/>
6235                 </links>
6236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6237                 </permacrud>
6238         </class>
6239
6240         <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">
6241                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
6242                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
6243                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
6244                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6245                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6246                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
6247                 </fields>
6248                 <links>
6249                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
6250                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
6251                 </links>
6252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6253                 </permacrud>
6254         </class>
6255
6256         <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">
6257                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
6258                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
6259                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6260                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6261                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6262                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
6263                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
6264                 </fields>
6265                 <links>
6266                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6267                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6268                 </links>
6269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6270                 </permacrud>
6271         </class>
6272
6273         <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">
6274                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
6275                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
6276                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
6277                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6278                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
6279                 </fields>
6280                 <links>
6281                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6282                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
6283                 </links>
6284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6285                 </permacrud>
6286         </class>
6287
6288         <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">
6289                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6290                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6291                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6292                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6293                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6294                 </fields>
6295                 <links>
6296                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6297                 </links>
6298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6299                 </permacrud>
6300         </class>
6301
6302         <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">
6303                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6304                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6305                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6306                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6307                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6308                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6309                 </fields>
6310                 <links>
6311                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6312                 </links>
6313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6314                 </permacrud>
6315         </class>
6316
6317         <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">
6318                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6319                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6320                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6321                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6322                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6323                 </fields>
6324                 <links>
6325                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6326                 </links>
6327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6328                 </permacrud>
6329         </class>
6330
6331         <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">
6332                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6333                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6334                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6335                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6336                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6337                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6338                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6339                 </fields>
6340                 <links>
6341                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6342                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6343                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
6344                 </links>
6345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6346                 </permacrud>
6347         </class>
6348
6349         <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">
6350                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6351                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6352                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6353                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6354                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6355                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6356                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6357                 </fields>
6358                 <links>
6359                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6360                 </links>
6361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6362                 </permacrud>
6363         </class>
6364
6365         <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">
6366                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6367                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6368                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6369                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6370                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6371                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6372                 </fields>
6373                 <links>
6374                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6375                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6376                 </links>
6377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6378                 </permacrud>
6379         </class>
6380
6381         <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">
6382                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6383                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6384                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6385                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6386                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6387                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6388                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6389                 </fields>
6390                 <links>
6391                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6392                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6393                 </links>
6394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6395                 </permacrud>
6396         </class>
6397
6398         <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">
6399                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6400                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6401                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6402                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6403                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6404                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6405                 </fields>
6406                 <links>
6407                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6408                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6409                 </links>
6410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6411                 </permacrud>
6412         </class>
6413
6414         <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">
6415                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6416                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6417                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6418                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6419                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6420                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6421                 </fields>
6422                 <links>
6423                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6424                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6425                 </links>
6426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6427                 </permacrud>
6428         </class>
6429
6430         <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">
6431                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6432                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6433                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6434                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6435                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6436                 </fields>
6437                 <links>
6438                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6439                 </links>
6440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6441                 </permacrud>
6442         </class>
6443
6444         <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">
6445                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6446                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6447                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6448                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6449                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6450                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6451                 </fields>
6452                 <links>
6453                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6454                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6455                 </links>
6456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6457                 </permacrud>
6458         </class>
6459
6460         <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">
6461                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6462                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6463                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6464                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6465                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6466                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6467                 </fields>
6468                 <links>
6469                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6470                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6471                 </links>
6472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6473                 </permacrud>
6474         </class>
6475
6476         <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">
6477                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6478                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6479                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6480                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6481                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6482                 </fields>
6483                 <links>
6484                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6485                 </links>
6486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6487                 </permacrud>
6488         </class>
6489
6490         <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">
6491                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6492                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6493                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6494                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6495                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6496                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6497                 </fields>
6498                 <links>
6499                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6500                 </links>
6501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6502                 </permacrud>
6503         </class>
6504
6505         <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">
6506                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6507                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6508                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6509                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6510                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6511                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6512                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6513                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6514                 </fields>
6515                 <links>
6516                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6517                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6518                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6519                 </links>
6520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6521                 </permacrud>
6522         </class>
6523
6524         <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">
6525                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6526                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6527                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6528                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6529                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6530                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6531                 </fields>
6532                 <links>
6533                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6534                 </links>
6535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6536                 </permacrud>
6537         </class>
6538
6539         <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">
6540                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6541                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6542                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6543                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6544                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6545                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6546                 </fields>
6547                 <links>
6548                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6549                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6550                 </links>
6551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6552                 </permacrud>
6553         </class>
6554
6555         <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">
6556                 <fields oils_persist:primary="id">
6557                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
6558                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
6559                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
6560                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
6561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6562                 </fields>
6563                 <links>
6564                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
6565                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6566                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
6567                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6568                 </links>
6569         </class>
6570
6571         <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">
6572                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
6573                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6574                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
6575                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
6576                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
6577                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6578                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6579                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
6580                 </fields>
6581                 <links/>
6582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6583                         <actions>
6584                                 <retrieve/>
6585                         </actions>
6586                 </permacrud>
6587         </class>
6588
6589         <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">
6590                 <fields oils_persist:primary="ptype_key">
6591                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
6592                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6593                 </fields>
6594                 <links/>
6595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6596                         <actions>
6597                                 <retrieve/>
6598                         </actions>
6599                 </permacrud>
6600         </class>
6601
6602         <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">
6603                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
6604                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6605                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
6606                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
6607                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6608                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6609                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6610                 </fields>
6611                 <links>
6612                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
6613                 </links>
6614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6615                         <actions>
6616                                 <retrieve/>
6617                         </actions>
6618                 </permacrud>
6619         </class>
6620
6621         <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">
6622                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
6623                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6624                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6625                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
6626                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6627                 </fields>
6628                 <links>
6629                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6630                 </links>
6631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6632                         <actions>
6633                                 <retrieve/>
6634                         </actions>
6635                 </permacrud>
6636         </class>
6637
6638         <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">
6639                 <fields oils_persist:primary="code">
6640                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
6641                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
6642                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
6643                 </fields>
6644                 <links/>
6645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6646                         <actions>
6647                                 <retrieve/>
6648                         </actions>
6649                 </permacrud>
6650         </class>
6651
6652         <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">
6653                 <oils_persist:source_definition>
6654
6655             SELECT  b.id,
6656                     MAX(dcp.edit_date) AS last_delete_date
6657              FROM   biblio.record_entry b
6658                     JOIN asset.call_number cn ON (cn.record = b.id)
6659                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
6660              WHERE  NOT b.deleted
6661              GROUP BY b.id
6662              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
6663
6664                 </oils_persist:source_definition>
6665                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
6666                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
6667                         <field reporter:label="Delete Date/Time" name="copy_delete_date" reporter:datatype="timestamp"/>
6668                 </fields>
6669                 <links>
6670                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6671                 </links>
6672                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6673                         <actions>
6674                                 <retrieve/>
6675                         </actions>
6676                 </permacrud>
6677         </class>
6678
6679
6680         <!-- ********************************************************************************************************************* -->
6681         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
6682         <!-- ********************************************************************************************************************* -->
6683         <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">
6684                 <fields oils_persist:primary="id">
6685                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
6686                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
6687                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
6688                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6689                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
6690                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
6691                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6692                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
6693                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
6694                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
6695                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
6696                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
6697                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
6698                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
6699                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6700                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
6701                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
6702                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
6703                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
6704                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
6705                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
6706                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
6707                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
6708                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
6709                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
6710                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
6711                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
6712                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
6713                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
6714                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6715                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6716                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6717                 </fields>
6718                 <links>
6719                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6720                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
6721                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
6722                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
6723                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6724                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
6725                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
6726                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
6727                 </links>
6728         </class>
6729
6730         <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">
6731                 <fields oils_persist:primary="id">
6732                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6733                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6734                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6735                 </fields>
6736                 <links>
6737                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6738                 </links>
6739         </class>
6740
6741         <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">
6742                 <fields oils_persist:primary="id">
6743                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6744                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6745                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6746                 </fields>
6747                 <links>
6748                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6749                 </links>
6750         </class>
6751
6752         <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">
6753                 <fields oils_persist:primary="id">
6754                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6755
6756                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
6757                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
6758                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
6759
6760                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
6761                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
6762                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
6763
6764                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
6765                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
6766
6767                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6768                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6769                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
6770
6771                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
6772                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
6773
6774                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
6775                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
6776                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
6777
6778                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
6779                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
6780                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
6781
6782                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6783                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
6784                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
6785                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
6786
6787                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
6788                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
6789
6790                 </fields>
6791                 <links>
6792                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
6793                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6794                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6795                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6796                 </links>
6797         </class>
6798
6799         <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">
6800                 <oils_persist:source_definition>
6801
6802                         SELECT  t.*
6803                           FROM  action.transit_copy t
6804                                 JOIN actor.org_unit AS s ON (t.source = s.id)
6805                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
6806                           WHERE s.parent_ou &lt;&gt; d.parent_ou
6807
6808                 </oils_persist:source_definition>
6809                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6810                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
6811                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
6812                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6813                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
6814                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
6815                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
6816                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
6817                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6818                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6819                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6820                 </fields>
6821                 <links>
6822                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
6823                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6824                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6825                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6826                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6827                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
6828                 </links>
6829         </class>
6830
6831     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
6832                 <oils_persist:source_definition>
6833
6834         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
6835                 SELECT
6836                         cp.id as copy,
6837                         COUNT(circ.id),
6838                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6839                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6840                 FROM
6841                         asset.copy cp
6842                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
6843                 GROUP BY 1, 3, 4
6844                 UNION
6845                 SELECT
6846                         cp.id as copy,
6847                         COUNT(circ.id),
6848                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6849                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6850                 FROM
6851                         asset.copy cp
6852                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
6853                 GROUP BY 1, 3, 4
6854                 UNION
6855                 SELECT
6856                         id as copy,
6857                         circ_count,
6858                         -1 AS year,
6859                         false as is_renewal
6860                 FROM
6861                         extend_reporter.legacy_circ_count
6862         )x GROUP BY 1, 3, 4
6863
6864                 </oils_persist:source_definition>
6865         <fields>
6866             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
6867             <field reporter:label="Count" name="count" reporter:datatype="int"/>
6868             <field reporter:label="Year" name="year" reporter:datatype="int"/>
6869             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
6870         </fields>
6871                 <links>
6872                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
6873                 </links>
6874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6875                         <actions>
6876                                 <retrieve/>
6877                         </actions>
6878                 </permacrud>
6879     </class>
6880
6881         <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">
6882                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6883                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
6884                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
6885                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
6886                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6887                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
6888                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
6889                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
6890                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
6891                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
6892                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
6893                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
6894                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
6895                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
6896                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
6897                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
6898                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
6899                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
6900                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
6901                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
6902                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
6903                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
6904                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
6905                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
6906                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
6907                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6908                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6909                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6910                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
6911                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
6912                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
6913                 </fields>
6914                 <links>
6915                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6916                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
6917                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
6918                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6919                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
6920                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6921                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6922                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6923                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6924                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6925                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6926                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6927                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
6928                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6929                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6930                 </links>
6931         </class>
6932
6933     <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">
6934         <fields oils_persist:primary="id">
6935             <field reporter:label="Title" name="title" reporter:datatype="text"/>
6936             <field reporter:label="Author" name="author" reporter:datatype="text"/>
6937             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
6938             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6939             <field reporter:label="Price" name="price" reporter:datatype="money"/>
6940             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6941             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
6942             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
6943             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6944             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
6945             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6946             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
6947             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
6948             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
6949             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6950             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6951             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6952             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6953             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
6954             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
6955             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6956             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6957             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6958             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
6959             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6960             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
6961             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
6962             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
6963             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
6964             <field reporter:label="Status" name="status" reporter:datatype="link"/>
6965             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
6966             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
6967             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
6968             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
6969         </fields>
6970         <links>
6971             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6972             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6973             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6974             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6975             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6976         </links>
6977     </class>
6978
6979     <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">
6980         <fields oils_persist:primary="id">
6981             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6982             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6983             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6984             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6985         </fields>
6986         <links>
6987             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6988             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6989         </links>
6990     </class>
6991
6992     <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">
6993         <fields oils_persist:primary="owning_lib">
6994             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6995             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6996             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6997         </fields>
6998         <links>
6999             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7000         </links>
7001     </class>
7002
7003     <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">
7004         <fields oils_persist:primary="id">
7005             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7006             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7007             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7008             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7009             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7010         </fields>
7011         <links>
7012             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7013             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7014             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7015         </links>
7016     </class>
7017
7018     <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">
7019         <fields oils_persist:primary="circ_lib">
7020             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7021             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7022             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7023             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7024         </fields>
7025         <links>
7026             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7027             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7028         </links>
7029     </class>
7030
7031     <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">
7032         <fields oils_persist:primary="id">
7033             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7034             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7035             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7036             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7037             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7038         </fields>
7039         <links>
7040             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7041             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7042             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7043         </links>
7044     </class>
7045
7046     <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">
7047         <fields oils_persist:primary="home_ou">
7048             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
7049             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7050             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7051             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7052         </fields>
7053         <links>
7054             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7055             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
7056         </links>
7057     </class>
7058         <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">
7059                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
7060                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
7061                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
7062                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
7063                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7064                 </fields>
7065                 <links>
7066                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7067                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
7068                 </links>
7069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7070                         <actions>
7071                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7072                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
7073                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7074                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
7075                         </actions>
7076                 </permacrud>
7077         </class>
7078         <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">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
7080                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
7081                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
7082                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
7083                 </fields>
7084                 <links>
7085                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7086                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
7087                         </links>
7088                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7089                 <actions>
7090                                 <create permission="ADMIN_ACQ_FUND_TAG">
7091                                         <context link="tag" field="owner"/>
7092                                 </create>
7093                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7094                                         <context link="tag" field="owner"/>
7095                                 </retrieve>
7096                                 <update permission="ADMIN_ACQ_FUND_TAG">
7097                                         <context link="tag" field="owner"/>
7098                                 </update>
7099                                 <delete permission="ADMIN_ACQ_FUND_TAG">
7100                                         <context link="tag" field="owner"/>
7101                                 </delete>
7102                         </actions>
7103                 </permacrud>
7104         </class>
7105
7106         <!-- ********************************************************************************************************************* -->
7107
7108 </IDL>
7109
7110 <!--
7111     vim:noet:ts=4:sw=4:
7112 -->