]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Merge Dan Wells' changes to the serial schema from the
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131
132         <!-- Actually in the DB -->
133         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
138                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
139                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
140                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
141                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
142                 </fields>
143                 <links>
144                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
145                 </links>
146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
147                         <actions>
148                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
149                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
150                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
151                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
152                         </actions>
153                 </permacrud>
154         </class>
155
156         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
157                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
158                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
159                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
160                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
164                 </links>
165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
166                         <actions>
167                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
168                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
169                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
170                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
171                         </actions>
172                 </permacrud>
173         </class>
174
175         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
176                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
177                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
178                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
179                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
180                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
181                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
182                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
183                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
184                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
185                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
186                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
187                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
188                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
189                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
190                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
191                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
192                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
193                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
194                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
195                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
196                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
197                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
198                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
199                 </fields>
200                 <links>
201                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
202                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
203                 </links>
204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
205                         <actions>
206                                 <create permission="CREATE_IMPORT_ITEM">
207                     <context link="definition" field="owner"/>
208                                 </create>
209                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
210                     <context link="definition" field="owner"/>
211                                 </retrieve>
212                                 <update permission="UPDATE_IMPORT_ITEM">
213                     <context link="definition" field="owner"/>
214                                 </update>
215                                 <delete permission="DELETE_IMPORT_ITEM">
216                     <context link="definition" field="owner"/>
217                                 </delete>
218                         </actions>
219                 </permacrud>
220         </class>
221
222         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
223                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
224                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
225                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
226                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
227                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
228                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
229                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
230                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
231                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
232                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
233                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
234                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
235                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
236                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
237                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
238                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
239                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
240                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
241                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
242                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
243                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
244                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
245                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
246                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
248                 </fields>
249                 <links>
250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
255                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
256                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
257                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
264                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
265                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
266                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
267                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
268                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
269                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
270                 </fields>
271                 <links>
272                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
273                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
274                 </links>
275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
276                         <actions>
277                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
278                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
279                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
280                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
281                         </actions>
282                 </permacrud>
283         </class>
284
285         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
286                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
287                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
288                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
289                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
290                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
291                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
292                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
293                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
294                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
295                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
296                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
297                 </fields>
298                 <links>
299                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
300                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
302             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
303             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
308                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
309                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
319                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
320                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
321                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
322                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
323                 </fields>
324                 <links/>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
328                 <retrieve/>
329                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
330                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <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">
336                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
337                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
338                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
339                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
340                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
341                 </fields>
342                 <links>
343                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
344                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <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">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
358                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
360                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
361                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
362                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
363                 </fields>
364                 <links>
365                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
366                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
367                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
368                 </links>
369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
370                         <actions>
371                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
372                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
373                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
374                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
375                         </actions>
376                 </permacrud>
377         </class>
378
379         <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">
380                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
381                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
382                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
383                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
384                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
385                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
386                 </fields>
387                 <links>
388                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
389                 </links>
390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
391                         <actions>
392                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
393                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
394                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
395                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
396                         </actions>
397                 </permacrud>
398         </class>
399
400         <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">
401                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
402                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
403                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
404                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
405                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
406                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
407                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
408                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
409                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
410                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
411                 </fields>
412                 <links>
413                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
414                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
415             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
416             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
417                 </links>
418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
419                         <actions>
420                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
421                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
422                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
423                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
424                         </actions>
425                 </permacrud>
426         </class>
427
428         <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">
429                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
430                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
431                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
432                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
433                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
434                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
435                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
436                 </fields>
437                 <links/>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
441                 <retrieve/>
442                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
443                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <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">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
450                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
452                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
453                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
454                 </fields>
455                 <links>
456                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
457                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
458                 </links>
459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
460                         <actions>
461                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
462                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
463                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
464                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
465                         </actions>
466                 </permacrud>
467         </class>
468
469         <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">
470                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
471                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
472                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
473                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
474                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
475                 </fields>
476                 <links>
477                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
478                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
479                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
480                 </links>
481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
482                         <actions>
483                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
484                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
485                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
486                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
487                         </actions>
488                 </permacrud>
489         </class>
490
491
492         <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">
493                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
494                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
496                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
497                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
498                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
499                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
500                 </fields>
501                 <links>
502                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
503                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
504                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
505                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
506                 </links>
507         </class>
508
509     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
510         <fields oils_persist:primary="name">
511             <field reporter:label="Name" name="name" reporter:datatype="text"/>
512             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
513             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
514             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
515         </fields>
516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
517             <actions>
518                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
519                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
520                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
521                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
522             </actions>
523         </permacrud>
524     </class>
525
526     <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">
527         <fields oils_persist:primary="id">
528             <field reporter:label="ID" name="id" reporter:datatype="id"/>
529             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
530             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
531             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
532             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
533         </fields>
534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
535             <actions>
536                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
537                 <retrieve/>
538                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
539                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
540             </actions>
541         </permacrud>
542     </class>
543
544         <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">
545                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
547                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
548                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
549                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
550                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
551                 </fields>
552                 <links>
553                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
554                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
555                 </links>
556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
557             <actions>
558                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
559                 <retrieve/>
560                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
561                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
562             </actions>
563         </permacrud>
564         </class>
565
566         <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">
567                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
568                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
569                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
570                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
571                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
572                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
573                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
574                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
575                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
576                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
577                 </fields>
578                 <links>
579                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
580                 </links>
581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
582             <actions>
583                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
584                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
585                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
586                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
587             </actions>
588         </permacrud>
589         </class>
590
591     <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">
592         <fields oils_persist:primary="name">
593             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
594             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
595             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
596             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
597             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
598             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
599             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
600             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
601             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
602         </fields>
603         <links>
604             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
605         </links>
606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
607             <actions>
608                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
609                 <retrieve/>
610                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
611                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
612             </actions>
613         </permacrud>
614     </class>
615
616     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
617         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
618             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
619             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
620             <field reporter:label="Name" name="name" reporter:datatype="text"/>
621             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
622             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
623             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
624             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
625         </fields>
626         <links>
627             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
628         </links>
629     </class>
630
631         <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">
632                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
633                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
634                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
635                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
636                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
637                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
638                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
639                 </fields>
640                 <links>
641             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
642             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
643                 </links>
644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
645                         <actions>
646                                 <retrieve/>
647                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
648                         </actions>
649                 </permacrud>
650         </class>
651
652         <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">
653                 <fields oils_persist:primary="key">
654                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
655                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
656                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
657                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
658                 </fields>
659                 <links/>
660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
661                         <actions>
662                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
663                                 <retrieve/>
664                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
665                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
666                         </actions>
667                 </permacrud>
668         </class>
669
670         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
671                 <fields oils_persist:primary="module">
672                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
673                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
674                 </fields>
675                 <links/>
676         </class>
677
678         <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">
679                 <fields oils_persist:primary="module">
680                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
681                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
682                 </fields>
683                 <links/>
684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
685                         <actions>
686                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
687                                 <retrieve/>
688                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
689                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
690                         </actions>
691                 </permacrud>
692         </class>
693
694         <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">
695                 <fields oils_persist:primary="module">
696                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
697                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
698                 </fields>
699                 <links/>
700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
701                         <actions>
702                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
703                                 <retrieve/>
704                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
705                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
706                         </actions>
707                 </permacrud>
708         </class>
709
710         <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">
711                 <fields oils_persist:primary="module">
712                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
713                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
714                 </fields>
715                 <links/>
716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
717                         <actions>
718                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
719                                 <retrieve/>
720                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
721                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
722                         </actions>
723                 </permacrud>
724         </class>
725
726         <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">
727                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
728                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
729                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
730                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
731                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
732                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
733                 </fields>
734                 <links>
735                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
736                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
737                 </links>
738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
739                         <actions>
740                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
741                     <context link="event_def" field="owner"/>
742                 </create>
743                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
744                     <context link="event_def" field="owner"/>
745                 </retrieve>
746                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
747                     <context link="event_def" field="owner"/>
748                 </update>
749                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
750                     <context link="event_def" field="owner"/>
751                 </delete>
752                         </actions>
753                 </permacrud>
754         </class>
755
756         <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">
757                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
758                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
759                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
760                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
761                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
762                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
763                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
764                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
765                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
766                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
767                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
768                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
769                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
770                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
771                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
772                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
773                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
774                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
775                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
776                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
777                 </fields>
778                 <links>
779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
780                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
781                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
782                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
783                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
784                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
785                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
786                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
787                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
792                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
793                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
794                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
795                         </actions>
796                 </permacrud>
797         </class>
798
799         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
800                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
801                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
802                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
803                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
804                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
805                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
806                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
807                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
808                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
809                         <field reporter:label="State" name="state" reporter:datatype="text"/>
810                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
811                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
812                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
813                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
814                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
815                 </fields>
816                 <links>
817                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
818                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
819                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
820                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
821                 </links>
822         </class>
823
824         <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">
825                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
826                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
827                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
828                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
829                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
830                 </fields>
831                 <links>
832                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
837                     <context link="event_def" field="owner"/>
838                 </create>
839                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
840                     <context link="event_def" field="owner"/>
841                 </retrieve>
842                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
843                     <context link="event_def" field="owner"/>
844                 </update>
845                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
846                     <context link="event_def" field="owner"/>
847                 </delete>
848                         </actions>
849                 </permacrud>
850         </class>
851
852         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
853                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
854                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
855                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
856                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
857                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
858                 </fields>
859                 <links>
860                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
861                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
862                 </links>
863         </class>
864
865         <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">
866                 <fields oils_persist:primary="code">
867                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
868                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
869                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
870                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
871                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
872                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
873                 </fields>
874                 <links/>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
878                 <retrieve/>
879                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
880                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
881             </actions>
882         </permacrud>
883         </class>
884
885         <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">
886                 <fields oils_persist:primary="code">
887                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
888                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
890                 </fields>
891                 <links/>
892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
893             <actions>
894                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
895                 <retrieve/>
896                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
897                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
898             </actions>
899         </permacrud>
900         </class>
901
902         <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">
903                 <fields oils_persist:primary="code">
904                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
905                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
906                 </fields>
907                 <links/>
908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
909             <actions>
910                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
911                 <retrieve/>
912                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
913                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
914             </actions>
915         </permacrud>
916         </class>
917
918         <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">
919                 <fields oils_persist:primary="code">
920                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
921                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
922                 </fields>
923                 <links/>
924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
925             <actions>
926                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
927                 <retrieve/>
928                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
929                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
930             </actions>
931         </permacrud>
932         </class>
933
934         <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">
935                 <fields oils_persist:primary="code">
936                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
937                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
938                 </fields>
939                 <links/>
940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
941             <actions>
942                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
943                 <retrieve/>
944                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
945                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
946             </actions>
947         </permacrud>
948         </class>
949
950         <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">
951                 <fields oils_persist:primary="code">
952                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
953                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
954                 </fields>
955                 <links/>
956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
957             <actions>
958                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
959                 <retrieve/>
960                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
961                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
962             </actions>
963         </permacrud>
964         </class>
965
966         <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">
967                 <fields oils_persist:primary="code">
968                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
969                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
970                 </fields>
971                 <links/>
972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
973             <actions>
974                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
975                 <retrieve/>
976                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
977                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
978             </actions>
979         </permacrud>
980         </class>
981
982         <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">
983                 <fields oils_persist:primary="code">
984                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
985                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
986                 </fields>
987                 <links/>
988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989             <actions>
990                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
991                 <retrieve/>
992                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
993                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
994             </actions>
995         </permacrud>
996         </class>
997
998         <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">
999                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1000                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1001                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1002                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1003                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1004                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1005                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1006                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1007                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1008                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1009                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1010                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1011                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1012                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1013                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1014                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1015                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1016                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1017                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1018                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1019                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1020                 </fields>
1021                 <links>
1022                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1023                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1024                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1025                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1026                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1027                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1028                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1029                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1030                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1031                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1032                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1033                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1034             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1035                 </links>
1036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1037             <actions>
1038                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1039                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1040                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1041                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1042             </actions>
1043         </permacrud>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1048                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1049                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1050                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1051                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1052                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1053                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1054                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
1055                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1056                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1057                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1058                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1059                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1060                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1061                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1062                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1063                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1064                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1065                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1066                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1067                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1068                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1069                 </fields>
1070                 <links>
1071                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1072                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1073                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1074                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1075                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1076                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1077                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1078                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1079                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1080                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1081                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1082                 </links>
1083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1084             <actions>
1085                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1086                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1087                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1088                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1089             </actions>
1090         </permacrud>
1091         </class>
1092
1093         <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">
1094                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1095                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1096                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1097                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1098                 </fields>
1099                 <links>
1100                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1101                 </links>
1102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1103             <actions>
1104                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1105                     <context link="matchpoint" field="org_unit"/>
1106                 </create>
1107                 <retrieve/>
1108                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1109                     <context link="matchpoint" field="org_unit"/>
1110                 </update>
1111                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1112                     <context link="matchpoint" field="org_unit"/>
1113                 </delete>
1114             </actions>
1115         </permacrud>
1116         </class>
1117
1118         <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">
1119                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1120                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1121                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1122                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1123                 </fields>
1124                 <links>
1125                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1126                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1127                 </links>
1128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1129             <actions>
1130                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1131                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1132                 </create>
1133                 <retrieve/>
1134                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1135                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1136                 </update>
1137                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1138                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1139                 </delete>
1140             </actions>
1141         </permacrud>
1142         </class>
1143
1144         <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">
1145                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1146                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1147                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1148                 </fields>
1149                 <links/>
1150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1151             <actions>
1152                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1153                 <retrieve/>
1154                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1155                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1156             </actions>
1157         </permacrud>
1158         </class>
1159
1160         <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">
1161                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1162                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1163                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1164                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1165                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1166                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1167                 </fields>
1168                 <links>
1169                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1170                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1171                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1172                 </links>
1173         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1174             <actions>
1175                 <create permission="ADMIN_SURVEY">
1176                     <context link="survey" field="owner"/>
1177                 </create>
1178                 <retrieve/>
1179                 <update permission="ADMIN_SURVEY">
1180                     <context link="survey" field="owner"/>
1181                 </update>
1182                 <delete permission="ADMIN_SURVEY">
1183                     <context link="survey" field="owner"/>
1184                 </delete>
1185             </actions>
1186         </permacrud>
1187         </class>
1188         <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">
1189                 <fields oils_persist:primary="id" oils_persist:sequence="">
1190                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1191                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1192                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1193                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1194                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1195                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1196                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1197                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1198                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1199                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1200                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1201                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1202                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1203                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1204                 </fields>
1205                 <links>
1206                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1207                 </links>
1208         </class>
1209         <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">
1210                 <fields oils_persist:primary="id" oils_persist:sequence="">
1211                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1212                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1213                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1214                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1215                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1216                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1217                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1218                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1219                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1220                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1221                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1222                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1223                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1224                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1225                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1226                 </fields>
1227                 <links>
1228                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1229                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1230                 </links>
1231         </class>
1232         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1233                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1234                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1235                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1236                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1237                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1238                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1239                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1240                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1241                 </fields>
1242                 <links>
1243                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1244                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1245                 </links>
1246         </class>
1247         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1249                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1250                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1251                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1252                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1253                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1254                 </fields>
1255                 <links>
1256                         <link field="usr" reltype="has_a" key="id" class="au"/>
1257                 </links>
1258         </class>
1259         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1261                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1262                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1263                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1264                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1265                 </fields>
1266                 <links>
1267                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1268                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1269                 </links>
1270         </class>
1271         <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">
1272                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1273                         <field name="field" reporter:datatype="link"/>
1274                         <field name="id" reporter:datatype="id" />
1275                         <field name="source" reporter:datatype="link"/>
1276                         <field name="value" reporter:datatype="text"/>
1277                 </fields>
1278                 <links>
1279                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1280                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1281                 </links>
1282         </class>
1283         <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">
1284                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1285                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1286                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1287                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1288                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1289                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1290                 </fields>
1291                 <links>
1292                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1293                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1294                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1295                 </links>
1296         </class>
1297         <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">
1298                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1299                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1300                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1301                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1302                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1303                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1304                 </fields>
1305                 <links>
1306                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1307                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1308                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1309                 </links>
1310         </class>
1311         <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">
1312                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1313                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1314                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1315                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1316                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1317                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1318                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1319                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1320                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1321                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1322                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1323                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1324                 </fields>
1325                 <links>
1326                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1327                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1328                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1329                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1330                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1331                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1332                 </links>
1333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1334             <actions>
1335                 <create permission="TRANSIT_COPY" context_field="owner">
1336                     <context link="target_copy" field="circ_lib"/>
1337                 </create>
1338                 <retrieve/>
1339                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1340                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1341             </actions>
1342         </permacrud>
1343         </class>
1344         <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">
1345                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1346                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1347                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1348                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1349                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1350                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1351                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1352                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1353                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1354                 </fields>
1355                 <links>
1356                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1357                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1358                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1359                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1360                 </links>
1361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1362             <actions>
1363                 <create permission="ADMIN_SURVEY">
1364                     <context link="survey" field="owner"/>
1365                 </create>
1366                 <retrieve/>
1367                 <update permission="ADMIN_SURVEY">
1368                     <context link="survey" field="owner"/>
1369                 </update>
1370                 <delete permission="ADMIN_SURVEY">
1371                     <context link="survey" field="owner"/>
1372                 </delete>
1373             </actions>
1374         </permacrud>
1375         </class>
1376         <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">
1377                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1378                         <field name="bucket" />
1379                         <field name="id" reporter:datatype="id" />
1380                         <field name="target_copy" reporter:datatype="link"/>
1381                         <field name="create_time" reporter:datatype="timestamp" />
1382                         <field name="pos" reporter:datatype="int" />
1383                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1384                 </fields>
1385                 <links>
1386                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1387                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1388             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1389                 </links>
1390         </class>
1391         <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">
1392                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1393                         <field name="id" reporter:datatype="id" />
1394                         <field name="item" reporter:datatype="link"/>
1395                         <field name="note" reporter:datatype="text" />
1396                 </fields>
1397                 <links>
1398                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1399                 </links>
1400         </class>
1401         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1402                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1403                         <field name="active" reporter:datatype="bool"/>
1404                         <field name="arn_source" />
1405                         <field name="arn_value" />
1406                         <field name="create_date" reporter:datatype="timestamp"/>
1407                         <field name="creator" />
1408                         <field name="deleted" reporter:datatype="bool"/>
1409                         <field name="edit_date" reporter:datatype="timestamp"/>
1410                         <field name="editor" />
1411                         <field name="id" reporter:datatype="id" />
1412                         <field name="last_xact_id" />
1413                         <field name="marc" />
1414                         <field name="source" />
1415                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1416                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1417                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1418                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1419                 </fields>
1420                 <links>
1421                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1422                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1423                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1424                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1425                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1426                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1427                 </links>
1428         </class>
1429         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1430                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1431                         <field name="char_encoding" />
1432                         <field name="id" />
1433                         <field name="record" />
1434                         <field name="record_status" />
1435                 </fields>
1436                 <links>
1437                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1438                 </links>
1439         </class>
1440         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
1441                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1442                         <field name="id" reporter:datatype="id" />
1443                         <field name="bib" reporter:datatype="link" />
1444                         <field name="authority" reporter:datatype="link" />
1445                 </fields>
1446                 <links>
1447                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1448                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1449                 </links>
1450         </class>
1451         <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">
1452                 <fields oils_persist:primary="code" oils_persist:sequence="">
1453                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1454                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1455                 </fields>
1456                 <links/>
1457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1458             <actions>
1459                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1460                 <retrieve/>
1461                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1462                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1463             </actions>
1464         </permacrud>
1465         </class>
1466         <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">
1467                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1468                         <field name="accepting_usr" />
1469                         <field name="amount" reporter:datatype="money" />
1470                         <field name="amount_collected" reporter:datatype="money" />
1471                         <field name="approval_code" reporter:datatype="text"/>
1472                         <field name="cash_drawer" reporter:datatype="link"/>
1473                         <field name="cc_first_name" reporter:datatype="text"/>
1474                         <field name="cc_last_name" reporter:datatype="text"/>
1475                         <field name="cc_number" reporter:datatype="text"/>
1476                         <field name="cc_type" reporter:datatype="text"/>
1477                         <field name="cc_processor" reporter:datatype="text"/>
1478                         <field name="expire_month" reporter:datatype="int" />
1479                         <field name="expire_year" reporter:datatype="int" />
1480                         <field name="id" reporter:datatype="id" />
1481                         <field name="note" reporter:datatype="text"/>
1482                         <field name="payment_ts" reporter:datatype="timestamp"/>
1483                         <field name="xact" reporter:datatype="link"/>
1484                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1485                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1486                 </fields>
1487                 <links>
1488                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1489                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1490                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1491                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1492                 </links>
1493         </class>
1494         <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">
1495                 <fields oils_persist:primary="name">
1496                         <field reporter:label="Field Class" name="field_class" />
1497                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1498                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1499                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1500                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1501                 </fields>
1502                 <links/>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1506                 <retrieve/>
1507                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1508                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1509             </actions>
1510         </permacrud>
1511         </class>
1512
1513         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias">
1514                 <fields oils_persist:primary="alias">
1515                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1516                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1517                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1518                 </fields>
1519                 <links>
1520                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1521                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1522                 </links>
1523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1524             <actions>
1525                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1526                 <retrieve/>
1527                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1528                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1529             </actions>
1530         </permacrud>
1531         </class>
1532
1533         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class">
1534                 <fields oils_persist:primary="name">
1535                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1536                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1537                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1538                 </fields>
1539                 <links>
1540                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1541                 </links>
1542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1543             <actions>
1544                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1545                 <retrieve/>
1546                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1547                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1548             </actions>
1549         </permacrud>
1550         </class>
1551
1552         <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">
1553                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1554                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1555                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1556                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1557                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1558                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1559                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1560                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1561                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1562                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1563                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1564                 </fields>
1565                 <links>
1566                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1567                 </links>
1568         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1569             <actions>
1570                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1571                 <retrieve/>
1572                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1573                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1574             </actions>
1575         </permacrud>
1576         </class>
1577         <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">
1578                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1579                         <field name="id" reporter:datatype="id" />
1580                         <field name="name" reporter:datatype="text"/>
1581                         <field name="xpath" reporter:datatype="text"/>
1582                         <field name="format" reporter:datatype="link"/>
1583                         <field name="first_word" reporter:datatype="bool" />
1584                 </fields>
1585                 <links/>
1586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1587             <actions>
1588                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1589                 <retrieve/>
1590                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1591                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1592             </actions>
1593         </permacrud>
1594         </class>
1595         <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">
1596                 <fields oils_persist:primary="code" oils_persist:sequence="">
1597                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1598                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1599                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1600                 </fields>
1601                 <links/>
1602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603             <actions>
1604                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1605                 <retrieve/>
1606                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1607                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1608             </actions>
1609         </permacrud>
1610         </class>
1611         <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">
1612                 <fields oils_persist:primary="code" oils_persist:sequence="">
1613                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1614                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1615                 </fields>
1616                 <links/>
1617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1618             <actions>
1619                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1620                 <retrieve/>
1621                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1622                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1623             </actions>
1624         </permacrud>
1625         </class>
1626         <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">
1627                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1628                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1629                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1630                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1631                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1632                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1633                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1634                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1635                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1636                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1637                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1638                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1639                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1640                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1641                 </fields>
1642                 <links>
1643                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1644                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1645                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1646                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1647                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1648                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1649                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1650                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1651                 </links>
1652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1653             <actions>
1654                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1655                 <retrieve/>
1656                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1657                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1658             </actions>
1659         </permacrud>
1660         </class>
1661         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1662                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1663                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1664                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1665                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1666                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1667                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1668                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1669                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1670                 </fields>
1671                 <links>
1672                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1673                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1674         </links>
1675         </class>
1676         <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">
1677                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1678                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1679                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1680                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1681                 </fields>
1682                 <links>
1683                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1684                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1685                 </links>
1686         </class>
1687         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1688                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1689                         <field name="id" reporter:datatype="id" />
1690                         <field name="value" oils_persist:i18n="true" />
1691                 </fields>
1692                 <links/>
1693         </class>
1694         <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">
1695                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1696                         <field name="balance_owed" reporter:datatype="money" />
1697                         <field name="total_owed" reporter:datatype="money" />
1698                         <field name="total_paid" reporter:datatype="money" />
1699                         <field name="usr" reporter:datatype="link"/>
1700                 </fields>
1701                 <links>
1702                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1703         </links>
1704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1705             <actions>
1706                 <retrieve permission="VIEW_USER">
1707                     <context link="usr" field="home_ou"/>
1708                 </retrieve>
1709             </actions>
1710         </permacrud>
1711         </class>
1712         <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">
1713                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1714                         <field name="collector" />
1715                         <field name="enter_time" reporter:datatype="timestamp"/>
1716                         <field name="id" reporter:datatype="id" />
1717                         <field name="location" reporter:datatype="link"/>
1718                         <field name="usr" reporter:datatype="link"/>
1719                 </fields>
1720                 <links>
1721                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1722                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1723                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1724                 </links>
1725         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1726             <actions>
1727                 <create permission="money.collections_tracker.create" context_field="location"/>
1728                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1729                 <delete permission="money.collections_tracker.create" context_field="location"/>
1730             </actions>
1731         </permacrud>
1732         </class>
1733         <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">
1734                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1735                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1736                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1737                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1738                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1739                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1740                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1741                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1742                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1743                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1744                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1745                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1746                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1747                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1748                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1749                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1750                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1751                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1752                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1753                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1754                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1755                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1756                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1757                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1758                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1759                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1760                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1761                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1762                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1763                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1764                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
1765                 </fields>
1766                 <links>
1767                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1768                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1769                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1770                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1771                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1772                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1773                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1774                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1775                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1776                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1777                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1778                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
1779                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1780                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1781                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1782                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1783                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
1784                 </links>
1785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1786             <actions>
1787                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1788                 <retrieve/>
1789                 <update permission="UPDATE_MARC" global_required="true"/>
1790             </actions>
1791         </permacrud>
1792         </class>
1793         <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">
1794                 <fields oils_persist:primary="id">
1795                         <field name="dow_0_close" />
1796                         <field name="dow_0_open" />
1797                         <field name="dow_1_close" />
1798                         <field name="dow_1_open" />
1799                         <field name="dow_2_close" />
1800                         <field name="dow_2_open" />
1801                         <field name="dow_3_close" />
1802                         <field name="dow_3_open" />
1803                         <field name="dow_4_close" />
1804                         <field name="dow_4_open" />
1805                         <field name="dow_5_close" />
1806                         <field name="dow_5_open" />
1807                         <field name="dow_6_close" />
1808                         <field name="dow_6_open" />
1809                         <field name="id" reporter:datatype="id" />
1810                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1811                 </fields>
1812                 <links>
1813                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1814                 </links>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1818                 <retrieve/>
1819                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1820                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1821             </actions>
1822         </permacrud>
1823         </class>
1824         <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">
1825                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1826                         <field name="close_end" reporter:datatype="timestamp" />
1827                         <field name="close_start" reporter:datatype="timestamp" />
1828                         <field name="id" reporter:datatype="id" />
1829                         <field name="org_unit" reporter:datatype="org_unit"/>
1830                         <field name="reason" reporter:datatype="text"/>
1831                 </fields>
1832                 <links>
1833                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1834                 </links>
1835         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1836             <actions>
1837                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1838                 <retrieve/>
1839                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1840                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1841             </actions>
1842         </permacrud>
1843         </class>
1844         <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">
1845                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1846                         <field name="extended" reporter:datatype="interval"/>
1847                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1848                         <field name="max_renewals" reporter:datatype="int" />
1849                         <field name="name" reporter:datatype="text"/>
1850                         <field name="normal" reporter:datatype="interval"/>
1851                         <field name="shrt" reporter:datatype="interval"/>
1852                 </fields>
1853                 <links>
1854                 </links>
1855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1856             <actions>
1857                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1858                 <retrieve/>
1859                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1860                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1861             </actions>
1862         </permacrud>
1863         </class>
1864         <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">
1865                 <fields oils_persist:primary="id" oils_persist:sequence="">
1866                         <field name="balance_owed" reporter:datatype="money"/>
1867                         <field name="id" reporter:datatype="id" />
1868                         <field name="last_billing_note" reporter:datatype="text"/>
1869                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1870                         <field name="last_billing_type" reporter:datatype="text"/>
1871                         <field name="last_payment_note" reporter:datatype="text"/>
1872                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1873                         <field name="last_payment_type" reporter:datatype="text"/>
1874                         <field name="total_owed" reporter:datatype="money"/>
1875                         <field name="total_paid" reporter:datatype="money"/>
1876                         <field name="usr" reporter:datatype="link"/>
1877                         <field name="xact_finish" reporter:datatype="timestamp" />
1878                         <field name="xact_start" reporter:datatype="timestamp" />
1879                         <field name="xact_type" reporter:datatype="text"/>
1880                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1881                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1882                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1883                         <field name="billing_location" reporter:datatype="link"/>
1884                 </fields>
1885                 <links>
1886                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1887                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1888                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1889                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1890                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1891                 </links>
1892         </class>
1893         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1894                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1895                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1896                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1897                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1898                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1899                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1900                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1901                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1902                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1903                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1904                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1905                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1906                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1907                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1908                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1909                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1910                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1911                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1912                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1913                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1914                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1915                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1916                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1917                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1918                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1919                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1920                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1921                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1922                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1923                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1924                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1925                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1926                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1927                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1928                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1929                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1930                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1931                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1932                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1933                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1934                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1935                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1936                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1937                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1938                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1939                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1940                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1941                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1942                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1943                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1944                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1945                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1946                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1947                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1948                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1949                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1950                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1951                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1952                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1953                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1954                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1955                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1956                 </fields>
1957                 <links>
1958                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1959                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1960                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1961                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1962                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1963                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1964                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1965                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1966                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1967                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1968                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1969                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1970                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1971                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1972                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1973                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1974                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1975                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1976                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1977                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1978                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1979                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1980                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1981                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1982                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1983                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1984                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1985                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1986                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1987                 </links>
1988         </class>
1989
1990         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
1991                 <fields oils_persist:primary="name">
1992                         <field name="name" reporter:datatype="text"/>
1993                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1994                 </fields>
1995                 <links/>
1996                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1997                         <actions>
1998                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1999                                 <retrieve/>
2000                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2001                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2002                         </actions>
2003                 </permacrud>
2004         </class>
2005         <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">
2006                 <fields oils_persist:primary="name">
2007                         <field name="name" reporter:datatype="text"/>
2008                         <field name="label" reporter:datatype="text"/>
2009                         <field name="description" reporter:datatype="text"/>
2010                         <field name="datatype" reporter:datatype="text"/>
2011                         <field name="fm_class" reporter:datatype="text"/>
2012                         <field name="grp" reporter:datatype="link"/>
2013                 </fields>
2014                 <links>
2015                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2016                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2017                 </links>
2018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2019                         <actions>
2020                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2021                                 <retrieve/>
2022                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2023                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2024                         </actions>
2025                 </permacrud>
2026         </class>
2027         <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">
2028                 <fields oils_persist:primary="name">
2029                         <field name="name" reporter:datatype="text"/>
2030                         <field name="label" reporter:datatype="text"/>
2031                         <field name="description" reporter:datatype="text"/>
2032                         <field name="datatype" reporter:datatype="text"/>
2033                         <field name="view_perm" reporter:datatype="link"/>
2034                         <field name="update_perm" reporter:datatype="link"/>
2035                         <field name="fm_class" reporter:datatype="text"/>
2036                         <field name="grp" reporter:datatype="link"/>
2037                 </fields>
2038                 <links>
2039                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2040                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2041                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2042                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2043                 </links>
2044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2045                         <actions>
2046                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2047                                 <retrieve/>
2048                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2049                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2050                         </actions>
2051                 </permacrud>
2052         </class>
2053         <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">
2054                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2055                         <field name="id" />
2056                         <field name="name"  reporter:datatype="text"/>
2057                         <field name="org_unit" reporter:datatype="org_unit"/>
2058                         <field name="value"  reporter:datatype="text"/>
2059                 </fields>
2060                 <links>
2061                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2062                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2063                 </links>
2064         </class>
2065         <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">
2066                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2067                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2068                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2069                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2070                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2071                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2072                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2073                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2074                 </fields>
2075                 <links>
2076                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2077                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2078                 </links>
2079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2080             <actions>
2081                 <create permission="CREATE_COPY_NOTE">
2082                     <context link="owning_copy" field="circ_lib"/>
2083                 </create>
2084                 <retrieve permission="VIEW_COPY_NOTES">
2085                     <context link="owning_copy" field="circ_lib"/>
2086                 </retrieve>
2087                 <update permission="UPDATE_COPY_NOTE">
2088                     <context link="owning_copy" field="circ_lib"/>
2089                 </update>
2090                 <delete permission="DELETE_COPY_NOTE">
2091                     <context link="owning_copy" field="circ_lib"/>
2092                 </delete>
2093             </actions>
2094         </permacrud>
2095         </class>
2096         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2097                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2098                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2099                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2100                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2101                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2102                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2103                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2104                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2105                 </fields>
2106                 <links>
2107                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2108                 </links>
2109         </class>
2110         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2111                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2112                         <field name="fingerprint"  reporter:datatype="text"/>
2113                         <field name="id" reporter:datatype="id" />
2114                         <field name="master_record" reporter:datatype="link"/>
2115                         <field name="mods"  reporter:datatype="text"/>
2116                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2117                 </fields>
2118                 <links>
2119                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2120                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2121                 </links>
2122         </class>
2123         <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">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2125                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2126                         <field name="name"  reporter:datatype="text"/>
2127                 </fields>
2128                 <links/>
2129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2130             <actions>
2131                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2132                 <retrieve/>
2133                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2134                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2135             </actions>
2136         </permacrud>
2137         </class>
2138         <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">
2139                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2140                         <field name="code"  reporter:datatype="text"/>
2141                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2142                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2143                 </fields>
2144                 <links/>
2145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2146             <actions>
2147                 <create permission="CREATE_PERM" global_required="true"/>
2148                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2149                 <update permission="UPDATE_PERM" global_required="true"/>
2150                 <delete permission="DELETE_PERM" global_required="true"/>
2151             </actions>
2152         </permacrud>
2153         </class>
2154         <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">
2155                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2156                         <field name="id" reporter:datatype="id" />
2157                         <field name="metarecord" reporter:datatype="link"/>
2158                         <field name="source" reporter:datatype="link"/>
2159                 </fields>
2160                 <links>
2161                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2162                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2163                 </links>
2164         </class>
2165         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
2166                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2167                         <field name="id" reporter:datatype="id" />
2168                         <field name="field" reporter:datatype="link"/>
2169                         <field name="source" reporter:datatype="link"/>
2170                         <field name="value"  reporter:datatype="text"/>
2171                 </fields>
2172                 <links>
2173                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2174                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2175                 </links>
2176         </class>
2177         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
2178                 <oils_persist:source_definition>
2179                         SELECT * FROM metabib.author_field_entry
2180                                                 UNION ALL
2181                         SELECT * FROM metabib.keyword_field_entry
2182                                                 UNION ALL
2183                         SELECT * FROM metabib.identifier_field_entry
2184                                                 UNION ALL
2185                         SELECT * FROM metabib.title_field_entry
2186                                                 UNION ALL
2187                         SELECT * FROM metabib.subject_field_entry
2188                                                 UNION ALL
2189                         SELECT * FROM metabib.series_field_entry
2190                 </oils_persist:source_definition>
2191                 <fields>
2192                         <field name="field" reporter:datatype="link"/>
2193                         <field name="id" reporter:datatype="id" />
2194                         <field name="source" reporter:datatype="link"/>
2195                         <field name="value"  reporter:datatype="text"/>
2196                 </fields>
2197                 <links>
2198                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2199                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2200                 </links>
2201         </class>
2202         <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">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2204                         <field name="field" reporter:datatype="link"/>
2205                         <field name="id" reporter:datatype="id" />
2206                         <field name="source" reporter:datatype="link"/>
2207                         <field name="value"  reporter:datatype="text"/>
2208                 </fields>
2209                 <links>
2210                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2211                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2212                 </links>
2213         </class>
2214         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2215                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2216                         <field name="accepting_usr" reporter:datatype="link"/>
2217                         <field name="amount" reporter:datatype="money" />
2218                         <field name="amount_collected" reporter:datatype="money" />
2219                         <field name="cash_drawer" reporter:datatype="link"/>
2220                         <field name="id" reporter:datatype="id" />
2221                         <field name="note"  reporter:datatype="text"/>
2222                         <field name="payment_ts" reporter:datatype="timestamp"/>
2223                         <field name="xact" reporter:datatype="link"/>
2224                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2225                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2226                 </fields>
2227                 <links>
2228                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2229                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2230                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2231                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2232                 </links>
2233         </class>
2234         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2235                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2236                         <field name="accepting_usr" reporter:datatype="link"/>
2237                         <field name="amount" reporter:datatype="money" />
2238                         <field name="amount_collected" reporter:datatype="money" />
2239                         <field name="id" reporter:datatype="id" />
2240                         <field name="note"  reporter:datatype="text"/>
2241                         <field name="payment_ts" reporter:datatype="timestamp"/>
2242                         <field name="xact" reporter:datatype="link"/>
2243                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2244                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2245                 </fields>
2246                 <links>
2247                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2248                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2249                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2250                 </links>
2251         </class>
2252         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2253                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2254                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2255                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2256                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2257                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2258                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2259                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2260                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2261                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2262                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2263                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2264                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2265                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2266                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2267                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2268                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2269                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2270                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2271                 </fields>
2272                 <links>
2273                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2274                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2275                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2276                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2277                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2278                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2279                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2280                 </links>
2281         </class>
2282
2283         <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">
2284                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2285                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2286                         <field name="name"  reporter:datatype="text"/>
2287                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2288                         <field name="block_list" reporter:datatype="text"/>
2289                         <field name="org_depth" reporter:datatype="int"/>
2290                 </fields>
2291                 <links/>
2292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2293             <actions>
2294                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2295                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2296                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2297                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2298             </actions>
2299         </permacrud>
2300         </class>
2301         <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">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2303                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2304                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2305                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2306                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2307                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2308                 </fields>
2309                 <links>
2310                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2311                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2312                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2313         </links>
2314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2315             <actions>
2316                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2317                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2318                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2319                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <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">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2325                         <field name="holdable" reporter:datatype="bool"/>
2326                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2327                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2328                         <field name="opac_visible" reporter:datatype="bool"/>
2329                 </fields>
2330                 <links/>
2331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2332             <actions>
2333                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2334                 <retrieve/>
2335                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2336                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2337             </actions>
2338         </permacrud>
2339         </class>
2340         <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">
2341                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2342                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2343                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2344                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2345                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2346                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2347                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2348                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2349                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2350                 </fields>
2351                 <links>
2352                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2353                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2354                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2355                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2356                 </links>
2357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2358                         <actions>
2359                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2360                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2361                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2362                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2363                         </actions>
2364                 </permacrud>
2365         </class>
2366         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2367                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2368                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2369                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2370                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2371                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2372                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2373                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2374                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2375                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2376                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2377                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2378                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2379                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2380                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2381                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2382                 </fields>
2383                 <links>
2384                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2385                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2386                 </links>
2387         </class>
2388
2389         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
2390                 <fields oils_persist:primary="id" oils_persist:sequence="usr_saved_search_id_seq">
2391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2392                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2393                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2394                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2395                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2396                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2397                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2398                 </fields>
2399                 <links>
2400                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2401                 </links>
2402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2403                 </permacrud>
2404         </class>
2405
2406         <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">
2407                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2408                         <field name="call_number" />
2409                         <field name="create_date" reporter:datatype="timestamp"/>
2410                         <field name="creator" reporter:datatype="link"/>
2411                         <field name="id" reporter:datatype="id" />
2412                         <field name="pub" reporter:datatype="bool"/>
2413                         <field name="title"  reporter:datatype="text"/>
2414                         <field name="value"  reporter:datatype="text"/>
2415                 </fields>
2416                 <links>
2417                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2418                 </links>
2419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2420             <actions>
2421                 <create permission="CREATE_VOLUME_NOTE">
2422                     <context link="call_number" field="owning_lib"/>
2423                 </create>
2424                 <retrieve permission="VIEW_VOLUME_NOTES">
2425                     <context link="call_number" field="owning_lib"/>
2426                 </retrieve>
2427                 <update permission="UPDATE_VOLUME_NOTE">
2428                     <context link="call_number" field="owning_lib"/>
2429                 </update>
2430                 <delete permission="DELETE_VOLUME_NOTE">
2431                     <context link="call_number" field="owning_lib"/>
2432                 </delete>
2433             </actions>
2434         </permacrud>
2435         </class>
2436         <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">
2437                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2438                         <field name="create_date" reporter:datatype="timestamp"/>
2439                         <field name="creator" reporter:datatype="link"/>
2440                         <field name="edit_date" reporter:datatype="timestamp"/>
2441                         <field name="editor" reporter:datatype="link"/>
2442                         <field name="id" reporter:datatype="id" />
2443                         <field name="record" reporter:datatype="link"/>
2444                         <field name="value" reporter:datatype="text"/>
2445                 </fields>
2446                 <links>
2447                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2448                 </links>
2449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2450             <actions>
2451                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2452                 <retrieve/>
2453                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2454                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2455             </actions>
2456         </permacrud>
2457         </class>
2458         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2459                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2460                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2461                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2462                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2463                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2464                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2465                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2466                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2467                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2468                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2469                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2470                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2471                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2472                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2473                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2474                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2475                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2476                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2477                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2478                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2479                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2480                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2481                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2482                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2483                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2484                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2485                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2486                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2487                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2488                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2489                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2490                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2491                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2492                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2493                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2494                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2495                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2496                 </fields>
2497                 <links>
2498                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2499                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2500                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2501                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2502                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2503                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2504                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2505                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2506                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2507                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2508                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2509                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2510                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2511                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2512                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2513                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2514                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2515                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2516                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2517                 </links>
2518         </class>
2519         <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">
2520                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2521                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2522                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2523                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2524                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2525                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2526                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2527                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2528                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2529                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2530                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2531                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2532                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2533                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2534                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2535                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2536                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2537                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2538                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2539                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2540                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2541                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2542                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2543                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2544                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2545                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2546                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2547                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2548                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2549                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2550                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2551                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2552                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2553                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2554                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2555                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2556                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2557                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2558                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2559                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2560                 </fields>
2561                 <links>
2562                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2563                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2564                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2565                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2566                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2567                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2568                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2569                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2570                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2571                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2572                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2573                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2574                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2575                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2576                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2577                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2578                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2579                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2580                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2581                 </links>
2582         </class>
2583         <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">
2584                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2585                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2586                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2587                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2588                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2589                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2590                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2591                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2592                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2593                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2594                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2595                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2596                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2597                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2598                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2599                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2600                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2601                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2602                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2603                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2604                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2605                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2606                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2607                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2608                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2609                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2610                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2611                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2612                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2613                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2614                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2615                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2616                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2617                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2618                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2619                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2620                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2621                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2622                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2623                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2624                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2625                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2626                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2627                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2628                 </fields>
2629                 <links>
2630                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2631                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2632                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2633                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2634                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2635                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2636                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2637                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2638                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2639                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2640                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2641                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2642                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2643                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2644                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2645                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2646                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2647                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2648                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2649                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2650                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2651                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2652                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2653                 </links>
2654         </class>
2655
2656         <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">
2657                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2658                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2659                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2660                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2661                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2662                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2663                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2664                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2665                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2666                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2667                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2668                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2669                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2671                 </fields>
2672                 <links>
2673                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2674                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2675                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2676                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2677                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2678                 </links>
2679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2680                         <actions>
2681                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2682                                 <retrieve />
2683                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2684                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2685                         </actions>
2686                 </permacrud>
2687         </class>
2688
2689         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2690                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2691                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
2692                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2693                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2694                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2695                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2696                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2697                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2698                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2699                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2701                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2702                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2703                 </fields>
2704                 <links>
2705                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2706                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2707                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2708                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2709                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2710                 </links>
2711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2712                         <actions>
2713                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2714                                 <retrieve />
2715                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2716                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2717                         </actions>
2718                 </permacrud>
2719         </class>
2720         
2721         <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">
2722                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2723                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
2724                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2725                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2726                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2727                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2728                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2729                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2730                 </fields>
2731                 <links>
2732                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2733                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2734                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2735                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2736                 </links>
2737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2738                         <actions>
2739                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2740                                 <retrieve />
2741                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2742                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2743                         </actions>
2744                 </permacrud>
2745         </class>
2746         
2747         <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">
2748                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2749                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
2750                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2751                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2752                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2753                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2754                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2755                 </fields>
2756                 <links>
2757                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2758                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2759                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2760                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2761                 </links>
2762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2763                         <actions>
2764                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2765                                 <retrieve />
2766                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2767                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2768                         </actions>
2769                 </permacrud>
2770         </class>
2771         
2772         <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">
2773                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2774                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2775                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2776                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2777                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2778                 </fields>
2779                 <links>
2780                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2781                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2782                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2783                 </links>
2784                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2785                         <actions>
2786                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2787                                 <retrieve />
2788                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2789                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2790                         </actions>
2791                 </permacrud>
2792         </class>
2793         
2794         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2795                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2796                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2797                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2798                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2799                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2800                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2801                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2802                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2803                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2804                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2805                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2806                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2807                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2808                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2809                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2810                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2811                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2812                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2813                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2814                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2815                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2816                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2817                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2818                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2819                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2820                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2821                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2822                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2823                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2824                 </fields>
2825                 <links>
2826                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2827                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2828                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2829                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2830                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2831                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2832                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2833                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2834                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2835                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2836                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2837                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2838                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2839                 </links>
2840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2841                         <actions>
2842                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2843                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2844                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2845                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2846                         </actions>
2847                 </permacrud>
2848         </class>
2849         
2850         <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">
2851                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2852                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2853                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2854                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2855                 </fields>
2856                 <links>
2857                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2858                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2859                 </links>
2860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2861                         <actions>
2862                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2863                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2864                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2865                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2866                         </actions>
2867                 </permacrud>
2868         </class>
2869
2870         <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">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2872                         <field name="bucket" reporter:datatype="link"/>
2873                         <field name="id" reporter:datatype="id" />
2874                         <field name="target_call_number" reporter:datatype="link" />
2875                         <field name="create_time" reporter:datatype="timestamp" />
2876                         <field name="pos" reporter:datatype="int" />
2877                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2878                 </fields>
2879                 <links>
2880                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2881                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2882             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2883                 </links>
2884         </class>
2885         <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">
2886                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2887                         <field name="id" reporter:datatype="id" />
2888                         <field name="item" reporter:datatype="link"/>
2889                         <field name="note" reporter:datatype="text" />
2890                 </fields>
2891                 <links>
2892                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2893                 </links>
2894         </class>
2895         <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">
2896                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2897                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2898                         <field name="btype" reporter:datatype="text"/>
2899                         <field name="id" reporter:datatype="id" />
2900                         <field name="name" reporter:datatype="text"/>
2901                         <field name="owner" reporter:datatype="link"/>
2902                         <field name="pub" reporter:datatype="bool"/>
2903                         <field name="create_time" reporter:datatype="timestamp" />
2904                 </fields>
2905                 <links>
2906                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2907                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2908                 </links>
2909         </class>
2910         <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">
2911                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2912                         <field name="id" reporter:datatype="id" />
2913                         <field name="bucket" reporter:datatype="link"/>
2914                         <field name="note" reporter:datatype="text" />
2915                 </fields>
2916                 <links>
2917                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2918                 </links>
2919         </class>
2920         <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">
2921                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2922                         <field name="hold" reporter:datatype="link"/>
2923                         <field name="id" reporter:datatype="id" />
2924                         <field name="target_copy" reporter:datatype="link"/>
2925                 </fields>
2926                 <links>
2927                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2928                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2929                 </links>
2930         </class>
2931         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2932                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2933                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2934                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2935                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2936                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2937                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2938                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2939                 </fields>
2940                 <links>
2941                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2942                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2943                 </links>
2944         </class>
2945         <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">
2946                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2947                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2948                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2949                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2950                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2951                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2952                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2953                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2954                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2955                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2956                 </fields>
2957                 <links>
2958                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2959                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2960                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2961                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
2962                 </links>
2963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2964             <actions>
2965                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2966                 <retrieve/>
2967                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2968                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2969             </actions>
2970         </permacrud>
2971         </class>
2972
2973     <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">
2974         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2975             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2976             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2977             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2978             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2979         </fields>
2980         <links>
2981             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2982             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2983         </links>
2984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2985             <actions>
2986                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2987                 <retrieve/>
2988                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2989                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2990             </actions>
2991         </permacrud>
2992     </class>
2993
2994         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2995                 <fields>
2996                         <field name="id" oils_persist:virtual="true" />
2997                         <field name="location" oils_persist:virtual="true" />
2998                         <field name="owning_lib" oils_persist:virtual="true" />
2999                         <field name="holdings" oils_persist:virtual="true" />
3000                         <field name="current_holdings" oils_persist:virtual="true" />
3001                         <field name="supplements" oils_persist:virtual="true" />
3002                         <field name="current_supplements" oils_persist:virtual="true" />
3003                         <field name="indexes" oils_persist:virtual="true" />
3004                         <field name="current_indexes" oils_persist:virtual="true" />
3005                         <field name="online" oils_persist:virtual="true" />
3006                         <field name="missing" oils_persist:virtual="true" />
3007                         <field name="incomplete" oils_persist:virtual="true" />
3008                 </fields>
3009         </class>
3010
3011         <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">
3012                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3013                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3014                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3015                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3016                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3017                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3018                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3019                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3020                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3021                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3022                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3023                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3024                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3025                 </fields>
3026                 <links>
3027                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3028                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3029                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3030                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3031                 </links>
3032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3033                         <actions>
3034                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3035                                 <retrieve/>
3036                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3037                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3038                         </actions>
3039                 </permacrud>
3040         </class>
3041
3042         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
3043                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3044                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3045                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3046                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3047                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3048                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3049                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3050                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3051                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3052                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3053                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3054                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3055                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3056                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3057                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3058                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3059                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3060                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3061                 </fields>
3062                 <links>
3063                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3064                 </links>
3065                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3066                 </permacrud>
3067         </class>
3068
3069         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3070                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3071                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
3072                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
3073                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3074                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3075                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3076                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3077                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3081                 </fields>
3082                 <links>
3083                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3084                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3085                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3086                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3087                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3088                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3089                 </links>
3090         </class>
3091
3092         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
3093                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3094                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3095                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3096                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3097                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3098                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3099                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3100                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3101                 </fields>
3102                 <links>
3103                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3104                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3105                 </links>
3106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3107                 </permacrud>
3108         </class>
3109
3110         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3111                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3112                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3113                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3114                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3115                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="link"/>
3116                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3117                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3118                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3119                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3120                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3121                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3122                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3123                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3124                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3125                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3126                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3127                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3128                 </fields>
3129                 <links>
3130                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3131                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3132                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3133                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3134                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3135                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3136                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3137                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3138                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3139                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3140                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3141                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3142                 </links>
3143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3144                         <actions>
3145                                 <create/>
3146                                 <retrieve/>
3147                                 <update/>
3148                                 <delete/>
3149                         </actions>
3150                 </permacrud>
3151         </class>
3152
3153         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
3154                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3156                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3157                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3158                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3159                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3160                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3161                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3162                 </fields>
3163                 <links>
3164                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3165                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3166                 </links>
3167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3168                         <actions>
3169                                 <create/>
3170                                 <retrieve/>
3171                                 <update/>
3172                                 <delete/>
3173                         </actions>
3174                 </permacrud>
3175         </class>
3176
3177         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3178                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3179                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3180                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3181                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3182                 </fields>
3183                 <links>
3184                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3185                 </links>
3186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3187                 </permacrud>
3188         </class>
3189
3190         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
3191                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3192                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3193                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3194                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3195                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3196                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3197                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3198                 </fields>
3199                 <links>
3200                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3201                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3202                 </links>
3203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3204                 </permacrud>
3205         </class>
3206
3207         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3208                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3209                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3210                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3211                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3212                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3213                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3214                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3215                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3216                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3217                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3218                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3219                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3220                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3221                 </fields>
3222                 <links>
3223                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3224                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3225                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3226                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3227                 </links>
3228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3229                         <actions>
3230                                 <create/>
3231                                 <retrieve/>
3232                                 <update/>
3233                                 <delete/>
3234                         </actions>
3235                 </permacrud>
3236         </class>
3237
3238         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3239                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3240                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3241                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3243                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3244                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3245                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3246                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3247                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3248                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3249                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3250                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3251                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3252                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3253                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3254                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3255                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3256                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3257                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3258                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3259                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3260                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3261                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3262                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3263                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3264                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3265                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3266                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3267                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3268                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3269                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3270                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3271                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3272                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3276                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3277                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3278                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3279                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3280                 </fields>
3281                 <links>
3282                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3283                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3284                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3285                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3286                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3287                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3288                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3289                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3290                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3291                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3292                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3293                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3294                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3295                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3296                 </links>
3297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3298                         <actions>
3299                                 <create/>
3300                                 <retrieve/>
3301                                 <update/>
3302                                 <delete/>
3303                         </actions>
3304                 </permacrud>
3305         </class>
3306
3307         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3308                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3309                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3310                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3311                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3312                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3313                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3314                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3315                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3316                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3317                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3318                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3319                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3320                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3321                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3323                 </fields>
3324                 <links>
3325                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3326                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3327                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3328                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3329                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3330                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3331                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3332                 </links>
3333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3334                         <actions>
3335                                 <create/>
3336                                 <retrieve/>
3337                                 <update/>
3338                                 <delete/>
3339                         </actions>
3340                 </permacrud>
3341         </class>
3342
3343         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3344                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3345                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3346                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3347                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3348                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3349                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3350                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3351                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3352                 </fields>
3353                 <links>
3354                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3355                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3356                 </links>
3357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3358                         <actions>
3359                                 <create/>
3360                                 <retrieve/>
3361                                 <update/>
3362                                 <delete/>
3363                         </actions>
3364                 </permacrud>
3365         </class>
3366
3367         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
3368                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
3369                         <field name="id" reporter:datatype="id" />
3370                         <field name="distribution" reporter:datatype="link"/>
3371                         <field name="generated_coverage" reporter:datatype="text"/>
3372                         <field name="textual_holdings" reporter:datatype="text"/>
3373                 </fields>
3374                 <links>
3375                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3376                 </links>
3377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3378                         <actions>
3379                                 <create/>
3380                                 <retrieve/>
3381                                 <update/>
3382                                 <delete/>
3383                         </actions>
3384                 </permacrud>
3385         </class>
3386
3387         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
3388                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
3389                         <field name="id" reporter:datatype="id" />
3390                         <field name="distribution" reporter:datatype="link"/>
3391                         <field name="generated_coverage" reporter:datatype="text"/>
3392                         <field name="textual_holdings" reporter:datatype="text"/>
3393                 </fields>
3394                 <links>
3395                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3396                 </links>
3397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3398                         <actions>
3399                                 <create/>
3400                                 <retrieve/>
3401                                 <update/>
3402                                 <delete/>
3403                         </actions>
3404                 </permacrud>
3405         </class>
3406
3407         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
3408                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3409                         <field name="id" reporter:datatype="id" />
3410                         <field name="distribution" reporter:datatype="link"/>
3411                         <field name="generated_coverage" reporter:datatype="text"/>
3412                         <field name="textual_holdings" reporter:datatype="text"/>
3413                 </fields>
3414                 <links>
3415                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3416                 </links>
3417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3418                         <actions>
3419                                 <create/>
3420                                 <retrieve/>
3421                                 <update/>
3422                                 <delete/>
3423                         </actions>
3424                 </permacrud>
3425         </class>
3426
3427         <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">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3429                         <field name="id" reporter:datatype="id" />
3430                         <field name="owning_copy" reporter:datatype="link"/>
3431                         <field name="stat_cat" reporter:datatype="link"/>
3432                         <field name="stat_cat_entry" reporter:datatype="link"/>
3433                 </fields>
3434                 <links>
3435                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3436                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3437                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3438                 </links>
3439         </class>
3440         <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">
3441                 <fields oils_persist:primary="code">
3442                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3443                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3444                 </fields>
3445                 <links/>
3446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3447             <actions>
3448                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3449                 <retrieve/>
3450                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3451                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3452             </actions>
3453         </permacrud>
3454         </class>
3455         <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">
3456                 <fields oils_persist:primary="code">
3457                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3458                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3459                 </fields>
3460                 <links/>
3461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3462             <actions>
3463                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3464                 <retrieve/>
3465                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3466                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3467             </actions>
3468         </permacrud>
3469         </class>
3470         <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">
3471                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3472                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3473                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3474                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3475                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3476                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3477                 </fields>
3478                 <links>
3479             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3480         </links>
3481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3482             <actions>
3483                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3484                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3485                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3486                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3487             </actions>
3488         </permacrud>
3489         </class>
3490         <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">
3491                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3492                         <field name="id" reporter:datatype="id" />
3493                         <field name="name" reporter:datatype="text"/>
3494                 </fields>
3495                 <links/>
3496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3497             <actions>
3498                 <create permission="CREATE_LASSO" global_required="true"/>
3499                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3500                 <update permission="UPDATE_LASSO" global_required="true"/>
3501                 <delete permission="DELETE_LASSO" global_required="true"/>
3502             </actions>
3503         </permacrud>
3504         </class>
3505         <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">
3506                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3507                         <field name="id" reporter:datatype="id" />
3508                         <field name="lasso" reporter:datatype="link"/>
3509                         <field name="org_unit" reporter:datatype="org_unit"/>
3510                 </fields>
3511                 <links>
3512                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3513                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3514                 </links>
3515         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3516             <actions>
3517                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3518                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3519                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3520                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3521             </actions>
3522         </permacrud>
3523         </class>
3524         <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">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3526                         <field name="id" reporter:datatype="id" />
3527                         <field name="from_org" reporter:datatype="org_unit"/>
3528                         <field name="to_org" reporter:datatype="org_unit"/>
3529                         <field name="prox" reporter:datatype="int" />
3530                 </fields>
3531                 <links>
3532                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3533                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3534                 </links>
3535         </class>
3536         <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">
3537                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3538                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3539                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3540                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3541                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3542                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3543                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3544                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3545                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3546                 </fields>
3547                 <links/>
3548         </class>
3549         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3550                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3551                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3552                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3553                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3554                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3555                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3556                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3557                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3558                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3559                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3560                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3561                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3562                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3563                 </fields>
3564                 <links>
3565                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3566                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3567                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3568                 </links>
3569         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3570             <actions>
3571                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3572                 <retrieve/>
3573                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3574                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3575             </actions>
3576         </permacrud>
3577         </class>
3578         <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">
3579                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3580                         <field name="address_type"  reporter:datatype="text"/>
3581                         <field name="city"  reporter:datatype="text"/>
3582                         <field name="country"  reporter:datatype="text"/>
3583                         <field name="county"  reporter:datatype="text"/>
3584                         <field name="id" reporter:datatype="id" />
3585                         <field name="org_unit" reporter:datatype="org_unit"/>
3586                         <field name="post_code"  reporter:datatype="text"/>
3587                         <field name="state"  reporter:datatype="text"/>
3588                         <field name="street1"  reporter:datatype="text"/>
3589                         <field name="street2"  reporter:datatype="text"/>
3590                         <field name="valid" reporter:datatype="bool"/>
3591                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3592                 </fields>
3593                 <links>
3594                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3595                 </links>
3596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3597             <actions>
3598                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3599                 <retrieve/>
3600                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3601                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3602             </actions>
3603         </permacrud>
3604         </class>
3605         <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">
3606                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3607                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3608                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3609                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3610                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3611                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3612                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3613                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3614                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3615                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3616                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3617                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3618                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3619                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3620                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3621                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3622                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3623                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3624                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3625                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3626                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3627                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3628                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3629                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3630                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3631                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3632                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3636                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3637                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3638                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3639                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3640                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3641                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3642                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3643                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3644                 </fields>
3645                 <links>
3646                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3647                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3648                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3649                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3650                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3651                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3652                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3653                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3654                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3655                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3656                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3657                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3658                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3659                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3660                 </links>
3661         </class>
3662         <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">
3663                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3664                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3665                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3666                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3667                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3668                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3669                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3670                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3671                 </fields>
3672                 <links>
3673                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3674                 </links>
3675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3676                         <actions>
3677                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3678                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3679                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3680                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3681                         </actions>
3682                 </permacrud>
3683         </class>
3684         <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">
3685                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3686                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3687                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3688                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3689                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3690                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3691                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3692                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3693                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3694                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3695                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
3696                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3697                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3698                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3699                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3700                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3701                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3702                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3703                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3704                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3705                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3706                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3707                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3708                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3709                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3710                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3711                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3712                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3713                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3714                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3715                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3716                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3717                 </fields>
3718                 <links>
3719                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3720                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3721                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3722                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3723                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3724                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3725                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3726                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3727                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3728                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3729                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3730                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3731                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3732                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3733                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3734                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3735                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3736                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3737                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3738                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3739                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3740                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3741                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3742                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3743                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3744                 </links>
3745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3746             <actions>
3747                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3748                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3749                     <context field="id"/>
3750                     <context field="parent_ou"/>
3751                                 </retrieve>
3752                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3753                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3754             </actions>
3755         </permacrud>
3756         </class>
3757         <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">
3758                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3759                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3760                         <field name="btype" reporter:datatype="text"/>
3761                         <field name="id" reporter:datatype="id" />
3762                         <field name="name"  reporter:datatype="text"/>
3763                         <field name="owner" reporter:datatype="link"/>
3764                         <field name="pub" reporter:datatype="bool"/>
3765                         <field name="create_time" reporter:datatype="timestamp" />
3766                 </fields>
3767                 <links>
3768                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3769                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3770                 </links>
3771         </class>
3772         <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">
3773                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3774                         <field name="id" reporter:datatype="id" />
3775                         <field name="bucket" reporter:datatype="link"/>
3776                         <field name="note" reporter:datatype="text" />
3777                 </fields>
3778                 <links>
3779                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3780                 </links>
3781         </class>
3782         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3783                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3784                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3785                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3786                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3787                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3788                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3789                 </fields>
3790                 <links>
3791                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3792                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3793                 </links>
3794         </class>
3795         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3797                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3798                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3799                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3800                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3801                 </fields>
3802                 <links>
3803                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3804                 </links>
3805         </class>
3806         <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">
3807                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3808                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3809                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3810                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3811                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3812                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3813                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3814                 </fields>
3815                 <links>
3816                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3817                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3818                 </links>
3819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3820             <actions>
3821                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3822                 <retrieve />
3823                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3824                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3825             </actions>
3826         </permacrud>
3827         </class>
3828         <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">
3829                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3830                         <field name="field" reporter:datatype="link"/>
3831                         <field name="id" reporter:datatype="id" />
3832                         <field name="source" reporter:datatype="link"/>
3833                         <field name="value"  reporter:datatype="text"/>
3834                 </fields>
3835                 <links>
3836                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3837                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3838                 </links>
3839         </class>
3840         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3842                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3843                         <field name="btype" reporter:datatype="text"/>
3844                         <field name="id" reporter:datatype="id" />
3845                         <field name="name"  reporter:datatype="text"/>
3846                         <field name="owner" reporter:datatype="link"/>
3847                         <field name="pub" reporter:datatype="bool"/>
3848                         <field name="create_time" reporter:datatype="timestamp" />
3849                 </fields>
3850                 <links>
3851                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3852                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3853                 </links>
3854         </class>
3855         <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">
3856                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3857                         <field name="id" reporter:datatype="id" />
3858                         <field name="bucket" reporter:datatype="link"/>
3859                         <field name="note" reporter:datatype="text" />
3860                 </fields>
3861                 <links>
3862                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3863                 </links>
3864         </class>
3865         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3866                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3867                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3868                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3869                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3870                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3871                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3872                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3873                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3874                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3875                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3876                 </fields>
3877                 <links>
3878                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3879                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3880                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3881                 </links>
3882         </class>
3883         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3884                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3885                         <field name="id" reporter:datatype="id" />
3886                         <field name="ind1" />
3887                         <field name="ind2" />
3888                         <field name="record" />
3889                         <field name="subfield" />
3890                         <field name="tag" />
3891                         <field name="value" />
3892                 </fields>
3893                 <links>
3894                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3895                 </links>
3896         </class>
3897         <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">
3898                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3899                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3900                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3901                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3902                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3903                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3904                 </fields>
3905                 <links>
3906                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3907                 </links>
3908         </class>
3909         <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">
3910                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3911                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3912                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3913                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3914                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3915                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3916                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3917                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3918                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3919                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3920                 </fields>
3921                 <links>
3922                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3923                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3924                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3925                 </links>
3926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3927             <actions>
3928                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3929                 <retrieve/>
3930                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3931                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3932             </actions>
3933         </permacrud>
3934         </class>
3935         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3936                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3937                         <field name="create_date" reporter:datatype="timestamp"/>
3938                         <field name="creator" reporter:datatype="link"/>
3939                         <field name="edit_date" reporter:datatype="timestamp"/>
3940                         <field name="editor" reporter:datatype="link"/>
3941                         <field name="id" reporter:datatype="id" />
3942                         <field name="pub" reporter:datatype="bool"/>
3943                         <field name="record" reporter:datatype="link"/>
3944                         <field name="value"  reporter:datatype="text"/>
3945                 </fields>
3946                 <links>
3947                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3948                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3949                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3950                 </links>
3951         </class>
3952         <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">
3953                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3954                         <field name="balance_owed" reporter:datatype="money" />
3955                         <field name="total_owed" reporter:datatype="money" />
3956                         <field name="total_paid" reporter:datatype="money" />
3957                         <field name="usr" reporter:datatype="link"/>
3958                 </fields>
3959                 <links>
3960                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3961                 </links>
3962         </class>
3963         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3964                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3965                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3966                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3967                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3968                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3969                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3970                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3971                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3972                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3973                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3974                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3975                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3976                 </fields>
3977                 <links>
3978                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3979                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3980                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3981                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3982                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3983                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3984                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3985                 </links>
3986         </class>
3987         <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">
3988                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3989                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3990                         <field name="quality" reporter:datatype="int" />
3991                         <field name="source" reporter:datatype="text"/>
3992                         <field name="transcendant" reporter:datatype="bool"/>
3993                 </fields>
3994                 <links/>
3995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3996             <actions>
3997                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3998                 <retrieve/>
3999                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4000                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4001             </actions>
4002         </permacrud>
4003         </class>
4004         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4005                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4006                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4007                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4008                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4009                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4010                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4011                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4012                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4013                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4014                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4015                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4016                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4017                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4018                 </fields>
4019                 <links>
4020                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4021                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4022                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4023                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4024                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4025                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4026                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4027                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4028                 </links>
4029         </class>
4030         <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">
4031                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4032                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4033                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4034                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4035                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4036                 </fields>
4037                 <links>
4038                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4039                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4040                 </links>
4041         </class>
4042         <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">
4043                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4044                         <field name="bucket" reporter:datatype="link"/>
4045                         <field name="id" reporter:datatype="id" />
4046                         <field name="target_user" reporter:datatype="link"/>
4047                         <field name="create_time" reporter:datatype="timestamp" />
4048                         <field name="pos" reporter:datatype="int" />
4049                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4050                 </fields>
4051                 <links>
4052                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4053                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4054             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4055                 </links>
4056         </class>
4057         <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">
4058                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4059                         <field name="id" reporter:datatype="id" />
4060                         <field name="item" reporter:datatype="link"/>
4061                         <field name="note" reporter:datatype="text" />
4062                 </fields>
4063                 <links>
4064                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4065                 </links>
4066         </class>
4067         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4068                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4069                         <field name="balance_owed" reporter:datatype="money" />
4070                         <field name="total_owed" reporter:datatype="money" />
4071                         <field name="total_paid" reporter:datatype="money" />
4072                         <field name="usr" reporter:datatype="link"/>
4073                 </fields>
4074                 <links>
4075                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4076                 </links>
4077         </class>
4078         <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">
4079                 <fields oils_persist:primary="code" oils_persist:sequence="">
4080                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4081                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4082                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4083                 </fields>
4084                 <links/>
4085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4086             <actions>
4087                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4088                 <retrieve/>
4089                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4090                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4091             </actions>
4092         </permacrud>
4093         </class>
4094         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4095                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4096                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4097                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4098                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4099                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4100                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4101                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4102                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4103                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4104                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4105                 </fields>
4106                 <links>
4107                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4108                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4109                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4110                 </links>
4111         </class>
4112         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4113                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4114                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4115                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4116                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4117                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4118                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4119                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4120                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4121                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4122                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4123                 </fields>
4124                 <links>
4125                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4126                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4127                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4128                 </links>
4129         </class>
4130         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4131                 <fields oils_persist:primary="id" oils_persist:sequence="">
4132                         <field name="checkin_lib" reporter:datatype="link"/>
4133                         <field name="checkin_staff" reporter:datatype="link"/>
4134                         <field name="checkin_time" reporter:datatype="timestamp"/>
4135                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4136                         <field name="circ_staff" reporter:datatype="link"/>
4137                         <field name="desk_renewal" reporter:datatype="bool"/>
4138                         <field name="due_date" reporter:datatype="timestamp"/>
4139                         <field name="duration" reporter:datatype="interval"/>
4140                         <field name="duration_rule" reporter:datatype="link"/>
4141                         <field name="fine_interval" reporter:datatype="interval"/>
4142                         <field name="id" reporter:datatype="id" />
4143                         <field name="max_fine" reporter:datatype="money" />
4144                         <field name="max_fine_rule" reporter:datatype="link"/>
4145                         <field name="opac_renewal" reporter:datatype="bool"/>
4146                         <field name="phone_renewal" reporter:datatype="bool"/>
4147                         <field name="recurring_fine" reporter:datatype="money" />
4148                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4149                         <field name="renewal_remaining" reporter:datatype="int" />
4150                         <field name="stop_fines" reporter:datatype="text"/>
4151                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4152                         <field name="target_copy" reporter:datatype="link"/>
4153                         <field name="usr" reporter:datatype="link"/>
4154                         <field name="xact_finish" reporter:datatype="timestamp" />
4155                         <field name="xact_start" reporter:datatype="timestamp" />
4156                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4157                 </fields>
4158                 <links>
4159                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4160                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4161                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4162                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4163                 </links>
4164         </class>
4165         <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">
4166                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4167                         <field name="field" reporter:datatype="link"/>
4168                         <field name="id" reporter:datatype="id" />
4169                         <field name="source" reporter:datatype="link"/>
4170                         <field name="value" reporter:datatype="text"/>
4171                 </fields>
4172                 <links>
4173                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4174                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4175                 </links>
4176         </class>
4177         <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">
4178                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4179                         <field name="high" reporter:datatype="money" />
4180                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4181                         <field name="low" reporter:datatype="money" />
4182                         <field name="name" reporter:datatype="text"/>
4183                         <field name="normal" reporter:datatype="money" />
4184                         <field name="recurrence_interval" reporter:datatype="interval"/>
4185                 </fields>
4186                 <links/>
4187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4188             <actions>
4189                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4190                 <retrieve/>
4191                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4192                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4193             </actions>
4194         </permacrud>
4195         </class>
4196         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4197                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4198                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4199                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4200                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4201                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4202                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4203                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4204                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4205                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4206                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4207                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4208                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4209                 </fields>
4210                 <links>
4211                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4212                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4213                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4214                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4215                 </links>
4216         </class>
4217         <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">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4219                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4220                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4221                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4222                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4223                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4224                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4225                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4226                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4227                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4228                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4229                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4230                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4231                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4232                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4233                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4234                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4235                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4236                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4237                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4238                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4239                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4240                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4241                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4242                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4243                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4244                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4245                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4246                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4247                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4248                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4249                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4250                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4251                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4252                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4253                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4254                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4255                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4256                 </fields>
4257                 <links>
4258                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4259                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4260                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4261                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4262                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4263                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4264                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4265                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4266                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4267                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4268                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4269                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4270                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4271                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4272                 </links>
4273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4274             <actions>
4275                 <create permission="CREATE_COPY">
4276                     <context link="call_number" field="owning_lib"/>
4277                 </create>
4278                 <retrieve/>
4279                 <update permission="UPDATE_COPY">
4280                     <context link="call_number" field="owning_lib"/>
4281                 </update>
4282                 <delete permission="DELETE_COPY">
4283                     <context link="call_number" field="owning_lib"/>
4284                 </delete>
4285             </actions>
4286         </permacrud>
4287         </class>
4288
4289         <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
4290                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4291                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4292                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4293                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4294                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4295                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4296                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4297                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4298                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4299                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4300                         <field reporter:label="Location" name="location" reporter:datatype="int"/>
4301                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4302                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4303                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4304                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4305                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4306                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4307                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4308                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4309                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4310                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
4311                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4312                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4313                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4314                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4315                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4316                 </fields>
4317                 <links>
4318                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4319                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4320                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4321                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4322                 </links>
4323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4324                 </permacrud>
4325         </class>
4326
4327         <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">
4328                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4329                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4330                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4331                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4332                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4333                 </fields>
4334                 <links/>
4335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4336             <actions>
4337                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4338                 <retrieve/>
4339                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4340                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4341             </actions>
4342         </permacrud>
4343         </class>
4344         <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">
4345                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4346                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4347                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4348                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4349                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4350                 </fields>
4351                 <links/>
4352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4353             <actions>
4354                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4355                 <retrieve/>
4356                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4357                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4358             </actions>
4359         </permacrud>
4360         </class>
4361         <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">
4362                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4363                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4364                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4365                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4366                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4367                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4368                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4369                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4370                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4371                 </fields>
4372                 <links>
4373                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4374                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4375                 </links>
4376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4377             <actions>
4378                 <create permission="CREATE_PERM" global_required="true"/>
4379                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4380                 <update permission="UPDATE_PERM" global_required="true"/>
4381                 <delete permission="DELETE_PERM" global_required="true"/>
4382             </actions>
4383         </permacrud>
4384         </class>
4385         <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">
4386                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4387                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4388                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4389                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4390                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4391                 </fields>
4392                 <links>
4393                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4394                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4395                 </links>
4396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4397             <actions>
4398                 <create permission="ADMIN_SURVEY">
4399                     <context link="question" jump="survey" field="owner"/>
4400                 </create>
4401                 <retrieve/>
4402                 <update permission="ADMIN_SURVEY">
4403                     <context link="question" jump="survey" field="owner"/>
4404                 </update>
4405                 <delete permission="ADMIN_SURVEY">
4406                     <context link="question" jump="survey" field="owner"/>
4407                 </delete>
4408             </actions>
4409         </permacrud>
4410         </class>
4411         <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">
4412                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4413                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4414                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4415                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4416                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4417                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4418                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
4419                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
4420                 </fields>
4421                 <links>
4422                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
4423                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4424                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4425                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4426                 </links>
4427         </class>
4428         <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">
4429                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4430                         <field name="balance_owed" reporter:datatype="money" />
4431                         <field name="total_owed" reporter:datatype="money" />
4432                         <field name="total_paid" reporter:datatype="money" />
4433                         <field name="usr" reporter:datatype="link"/>
4434                 </fields>
4435                 <links>
4436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4437                 </links>
4438         </class>
4439         <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">
4440                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4441                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4442                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4443                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4444                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4445                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4446                 </fields>
4447                 <links>
4448                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4449                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4450                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4451                 </links>
4452         </class>
4453         <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
4454                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
4455                         <field name="field" reporter:datatype="link"/>
4456                         <field name="id" reporter:datatype="id" />
4457                         <field name="source" reporter:datatype="link"/>
4458                         <field name="value" reporter:datatype="text"/>
4459                 </fields>
4460                 <links>
4461                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4462                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4463                 </links>
4464         </class>
4465         <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">
4466                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4467                         <field name="field" reporter:datatype="link"/>
4468                         <field name="id" reporter:datatype="id" />
4469                         <field name="source" reporter:datatype="link"/>
4470                         <field name="value" reporter:datatype="text"/>
4471                 </fields>
4472                 <links>
4473                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4474                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4475                 </links>
4476         </class>
4477         <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">
4478                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4479                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4480                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4481                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4482                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4483                 </fields>
4484                 <links>
4485                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4486                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4487                 </links>
4488         </class>
4489         <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">
4490                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4491                         <field name="depth" reporter:datatype="int" />
4492                         <field name="grantable" reporter:datatype="bool"/>
4493                         <field name="grp" reporter:datatype="link"/>
4494                         <field name="id" reporter:datatype="id" />
4495                         <field name="perm" reporter:datatype="link"/>
4496                 </fields>
4497                 <links>
4498                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4499                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4500                 </links>
4501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4502             <actions>
4503                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4504                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4505                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4506                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4507             </actions>
4508         </permacrud>
4509         </class>
4510         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4511                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4512                         <field name="items" oils_persist:virtual="true" />
4513                         <field name="btype" reporter:datatype="text"/>
4514                         <field name="id" reporter:datatype="id" />
4515                         <field name="name" reporter:datatype="text"/>
4516                         <field name="owner" reporter:datatype="link"/>
4517                         <field name="pub" reporter:datatype="bool"/>
4518                         <field name="create_time" reporter:datatype="timestamp" />
4519                 </fields>
4520                 <links>
4521                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4522                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4523                 </links>
4524         </class>
4525         <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">
4526                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4527                         <field name="id" reporter:datatype="id" />
4528                         <field name="bucket" reporter:datatype="link"/>
4529                         <field name="note" reporter:datatype="text" />
4530                 </fields>
4531                 <links>
4532                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4533                 </links>
4534         </class>
4535         <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">
4536                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4537                         <field name="id" reporter:datatype="int" />
4538                         <field name="usr" reporter:datatype="link"/>
4539                         <field name="work_ou" reporter:datatype="link"/>
4540                 </fields>
4541                 <links>
4542                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4543                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4544                 </links>
4545         </class>
4546         <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">
4547                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4548                         <field name="depth" reporter:datatype="int"/>
4549                         <field name="grantable" reporter:datatype="bool"/>
4550                         <field name="id" reporter:datatype="id" />
4551                         <field name="perm" reporter:datatype="link"/>
4552                         <field name="usr" reporter:datatype="link"/>
4553                 </fields>
4554                 <links>
4555                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4556                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4557                 </links>
4558         </class>
4559         <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">
4560                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4561                         <field name="object_id" reporter:datatype="text"/>
4562                         <field name="grantable" reporter:datatype="bool"/>
4563                         <field name="id" reporter:datatype="id" />
4564                         <field name="perm" reporter:datatype="link"/>
4565                         <field name="usr" reporter:datatype="link"/>
4566                         <field name="object_type" reporter:datatype="text"/>
4567                 </fields>
4568                 <links>
4569                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4570                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4571                 </links>
4572         </class>
4573         <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">
4574                 <fields oils_persist:primary="id" oils_persist:sequence="">
4575                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4576                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4577                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4578                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4579                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4580                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4581                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4582                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4583                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4584                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4585                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4586                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4587                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4588                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4589                 </fields>
4590                 <links>
4591                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4592                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4593                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4594                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4595                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4596                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4597                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4598                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4599                 </links>
4600         </class>
4601         <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">
4602                 <fields oils_persist:primary="id" oils_persist:sequence="">
4603                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4604                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4605                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4606                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4607                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4608                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4609                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4610                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4611                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4612                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4613                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4614                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4615                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4616                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4617                 </fields>
4618                 <links>
4619                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4620                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4621                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4622                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4623                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4624                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4625                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4626                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4627                 </links>
4628         </class>
4629         <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">
4630                 <fields oils_persist:primary="id" oils_persist:sequence="">
4631                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4632                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4633                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4634                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4635                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4636                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4637                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4638                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4639                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4640                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4641                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4642                 </fields>
4643                 <links>
4644                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4645                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4646                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4647                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4648                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4649                 </links>
4650         </class>
4651         <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">
4652                 <fields oils_persist:primary="id" oils_persist:sequence="">
4653                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4654                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4655                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4656                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4657                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4658                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4659                         <field reporter:label="Accepting User" name="accepting_usr" />
4660                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4661                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4662                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4663                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4664                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4665                 </fields>
4666                 <links>
4667                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4668                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4669                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4670                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4671                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4672                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4673                 </links>
4674         </class>
4675         <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">
4676                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4677                         <field name="bucket" reporter:datatype="link"/>
4678                         <field name="id" reporter:datatype="id" />
4679                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4680                         <field name="create_time" reporter:datatype="timestamp" />
4681                         <field name="pos" reporter:datatype="int" />
4682                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4683                 </fields>
4684                 <links>
4685                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4686                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4687             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4688                 </links>
4689         </class>
4690         <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">
4691                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4692                         <field name="id" reporter:datatype="id" />
4693                         <field name="item" reporter:datatype="link"/>
4694                         <field name="note" reporter:datatype="text" />
4695                 </fields>
4696                 <links>
4697                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4698                 </links>
4699         </class>
4700         <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">
4701                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4702                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4703                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4704                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4705                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4706                 </fields>
4707                 <links>
4708                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4709                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4710                 </links>
4711         </class>
4712
4713         <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">
4714                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4715                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4716                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4717                 </fields>
4718                 <links/>
4719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4720             <actions>
4721                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4722                 <retrieve/>
4723                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4724                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4725             </actions>
4726         </permacrud>
4727         </class>
4728
4729
4730         <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">
4731                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4732                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4733                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4734                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4735                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4736                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4737                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4738                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4739                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4740                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4741                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4742                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4743                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4744                 </fields>
4745                 <links>
4746                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4747                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4748                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4749                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4750                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4751                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4752                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4753                 </links>
4754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755             <actions>
4756                 <create permission="TRANSIT_COPY">
4757                     <context link="target_copy" field="owner"/>
4758                 </create>
4759                 <retrieve/>
4760                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4761                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4762             </actions>
4763         </permacrud>
4764         </class>
4765         <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">
4766                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4767                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4768                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4769                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4770                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4771                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4772                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4773                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4774                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4775                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4776                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4777                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4778                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4779                 </fields>
4780                 <links>
4781                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4782                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4783                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4784                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4785                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4786                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4787                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4788                 </links>
4789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4790             <actions>
4791                 <create permission="TRANSIT_COPY" context_field="owner">
4792                     <context link="target_copy" field="circ_lib"/>
4793                 </create>
4794                 <retrieve/>
4795                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4796                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4797             </actions>
4798         </permacrud>
4799         </class>
4800         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4802                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4803                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4804                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4805                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4806                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4807                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4808                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4809                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4810                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4811                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4812                 </fields>
4813                 <links>
4814                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4815                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4816                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4817                 </links>
4818         </class>
4819         <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">
4820                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4821                         <field name="grp" />
4822                         <field name="id" reporter:datatype="id" />
4823                         <field name="usr" />
4824                 </fields>
4825                 <links>
4826                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4827                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4828                 </links>
4829         </class>
4830         <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">
4831                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4832                         <field name="id" reporter:datatype="id" />
4833                         <field name="fq_field" reporter:datatype="text"/>
4834                         <field name="identity_value" reporter:datatype="text"/>
4835                         <field name="translation" reporter:datatype="text"/>
4836                         <field name="string" reporter:datatype="text"/>
4837                 </fields>
4838                 <links>
4839                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4840                 </links>
4841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4842             <actions>
4843                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4844                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4845                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4846                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4847             </actions>
4848         </permacrud>
4849         </class>
4850         <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">
4851                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4852                         <field name="id" reporter:datatype="id" />
4853                         <field name="fm_class" reporter:datatype="text"/>
4854                         <field name="field" reporter:datatype="text"/>
4855                         <field name="owner" reporter:datatype="org_unit"/>
4856                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4857                 </fields>
4858                 <links>
4859                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4860                 </links>
4861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4862             <actions>
4863                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4864                 <retrieve/>
4865                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4866                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4867             </actions>
4868         </permacrud>
4869         </class>
4870         <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">
4871                 <fields oils_persist:primary="code">
4872                         <field name="code" reporter:datatype="id" />
4873                         <field name="marc_code" reporter:datatype="text"/>
4874                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4875                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4876                 </fields>
4877                 <links/>
4878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4879             <actions>
4880                 <create permission="CREATE_LOCALE" global_required="true"/>
4881                 <retrieve/>
4882                 <update permission="UPDATE_LOCALE" global_required="true"/>
4883                 <delete permission="DELETE_LOCALE" global_required="true"/>
4884             </actions>
4885         </permacrud>
4886         </class>
4887         <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">
4888                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4889                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4890                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4891                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4892             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4893                 </fields>
4894                 <links>
4895                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4896                 </links>
4897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4898             <actions>
4899                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4900                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4901                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4902                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4903             </actions>
4904         </permacrud>
4905         </class>
4906
4907         <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">
4908                 <fields oils_persist:primary="id">
4909                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4910                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4911                 </fields>
4912                 <links/>
4913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4914             <actions>
4915                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4916                 <retrieve/>
4917                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4918                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4919             </actions>
4920         </permacrud>
4921         </class>
4922
4923         <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">
4924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
4925                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4926                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4927                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4928                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4929                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4930                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4931                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4932                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4933                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4934                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4935                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4936                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4937                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4938                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4939                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4940                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4941                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4942                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4943                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4944                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4945                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4946                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4947                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4948                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4949                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4950                 </fields>
4951                 <links>
4952                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4953                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4954                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4955                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4956                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4957                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
4958                 </links>
4959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4960             <actions>
4961                 <create permission="user_request.create">
4962                     <context link="usr" field="home_ou"/>
4963                                 </create>
4964                 <retrieve permission="user_request.view">
4965                     <context link="usr" field="home_ou"/>
4966                                 </retrieve>
4967                 <update permission="user_request.update">
4968                     <context link="usr" field="home_ou"/>
4969                                 </update>
4970                 <delete permission="user_request.delete">
4971                     <context link="usr" field="home_ou"/>
4972                                 </delete>
4973             </actions>
4974         </permacrud>
4975         </class>
4976
4977         <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">
4978                 <fields oils_persist:primary="code">
4979                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4980                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4981                 </fields>
4982                 <links/>
4983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4984             <actions>
4985                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4986                 <retrieve/>
4987                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4988                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4989             </actions>
4990         </permacrud>
4991         </class>
4992
4993         <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">
4994                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4995                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4996                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4997                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4998                         <field reporter:label="Ratio" name="ratio" />
4999                 </fields>
5000                 <links>
5001                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5002                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5003                 </links>
5004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5005                         <actions>
5006                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5007                                 <retrieve/>
5008                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5009                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5010                         </actions>
5011                 </permacrud>
5012         </class>
5013
5014         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5015                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5016                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5017                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5018                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5019                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5020                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5021                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5022                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5023                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5024                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5025                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5026                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5027                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5028                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5029                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5030                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5031                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5032                 </fields>
5033                 <links>
5034                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5035                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5036             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5037             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5038             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5039                 </links>
5040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5041             <actions>
5042                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5043                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5044                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5045                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5046             </actions>
5047         </permacrud>
5048         </class>
5049
5050         <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">
5051                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5052                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5053                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5054                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5055                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5056                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5057                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5058                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5059                 </fields>
5060                 <links>
5061                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5062                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5063                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5064                 </links>
5065         </class>
5066
5067         <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">
5068                 <fields oils_persist:primary="code">
5069                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5070                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5071                 </fields>
5072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5073             <actions>
5074                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5075                 <retrieve/>
5076                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5077                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5078             </actions>
5079                 </permacrud>
5080         </class>
5081
5082         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5083                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5084                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5085                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5086                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5087                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5088                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
5089                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5090                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5091                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5092                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5093                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5094                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5095                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5096                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5097                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5098                 </fields>
5099                 <links>
5100                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5101                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5102                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5103                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5104                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5105                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5106                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5107                 </links>
5108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5109             <actions>
5110                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5111                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5112                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5113                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5114             </actions>
5115         </permacrud>
5116         </class>
5117
5118         <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">
5119                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5120                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5121                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5122                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5123                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5124                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5125                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5126                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5127                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5128                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5129                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5130                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5131                 </fields>
5132                 <links>
5133                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5134                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5135                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5136                 </links>
5137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5138             <actions>
5139                 <create   permission="ADMIN_INVOICE">
5140                                         <context link="invoice" field="receiver"/>
5141                                 </create>
5142                 <retrieve permission="ADMIN_INVOICE">
5143                                         <context link="invoice" field="receiver"/>
5144                                 </retrieve>
5145                 <update   permission="ADMIN_INVOICE">
5146                                         <context link="invoice" field="receiver"/>
5147                                 </update>
5148                                 <delete   permission="ADMIN_INVOICE">
5149                                         <context link="invoice" field="receiver"/>
5150                                 </delete>
5151             </actions>
5152         </permacrud>
5153         </class>
5154
5155         <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">
5156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5157                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5158                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5159                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5160                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5161                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5162                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5163                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5164                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5165                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5166                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5167                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5168                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5169                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5170                 </fields>
5171                 <links>
5172                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5173                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5174                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5175                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5176                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5177                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5178                 </links>
5179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5180             <actions>
5181                 <create   permission="ADMIN_INVOICE">
5182                                         <context link="invoice" field="receiver"/>
5183                                 </create>
5184                 <retrieve permission="ADMIN_INVOICE">
5185                                         <context link="invoice" field="receiver"/>
5186                                 </retrieve>
5187                 <update   permission="ADMIN_INVOICE">
5188                                         <context link="invoice" field="receiver"/>
5189                                 </update>
5190                                 <delete   permission="ADMIN_INVOICE">
5191                                         <context link="invoice" field="receiver"/>
5192                                 </delete>
5193             </actions>
5194         </permacrud>
5195         </class>
5196
5197         <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">
5198                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5199                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5200                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5201                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5202                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5203                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5204                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5205                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5206                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5207                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5208                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5209                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5210                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5211                 </fields>
5212                 <links>
5213                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5214                 </links>
5215         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5216             <actions>
5217                 <create permission="ADMIN_PROVIDER">
5218                     <context link="provider" field="owner"/>
5219                 </create>
5220                 <retrieve permission="ADMIN_PROVIDER">
5221                     <context link="provider" field="owner"/>
5222                 </retrieve>
5223                 <update permission="ADMIN_PROVIDER">
5224                     <context link="provider" field="owner"/>
5225                 </update>
5226                 <delete permission="ADMIN_PROVIDER">
5227                     <context link="provider" field="owner"/>
5228                 </delete>
5229             </actions>
5230         </permacrud>
5231         </class>
5232
5233         <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">
5234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5235                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5236                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5237                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5238                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5239                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5240                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5241         </fields>
5242                 <links>
5243                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5244                 </links>
5245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5246             <actions>
5247                 <create permission="ADMIN_PROVIDER">
5248                     <context link="provider" field="owner"/>
5249                 </create>
5250                 <retrieve permission="ADMIN_PROVIDER">
5251                     <context link="provider" field="owner"/>
5252                 </retrieve>
5253                 <update permission="ADMIN_PROVIDER">
5254                     <context link="provider" field="owner"/>
5255                 </update>
5256                 <delete permission="ADMIN_PROVIDER">
5257                     <context link="provider" field="owner"/>
5258                 </delete>
5259             </actions>
5260         </permacrud>
5261     </class>
5262         <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">
5263                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5264                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5265                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5266                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5267                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5268                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5269                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5270                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5271                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5272                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5273                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5274                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5275                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5276                 </fields>
5277                 <links>
5278                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5279                 </links>
5280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5281             <actions>
5282                 <create permission="ADMIN_PROVIDER">
5283                     <context link="contact" jump='provider' field="owner"/>
5284                 </create>
5285                 <retrieve permission="ADMIN_PROVIDER">
5286                     <context link="contact" jump='provider' field="owner"/>
5287                 </retrieve>
5288                 <update permission="ADMIN_PROVIDER">
5289                     <context link="contact" jump='provider' field="owner"/>
5290                 </update>
5291                 <delete permission="ADMIN_PROVIDER">
5292                     <context link="contact" jump='provider' field="owner"/>
5293                 </delete>
5294             </actions>
5295         </permacrud>
5296         </class>
5297
5298         <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">
5299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5300                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5301                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5302                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5303                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5304                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5305                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5306                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5307                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5308                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5309                 </fields>
5310                 <links>
5311                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5312                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5313                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5314                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5315                 </links>
5316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5317                 </permacrud>
5318         </class>
5319
5320         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5321                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5322                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5323                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5324                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5325                 </fields>
5326                 <links>
5327             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5328                 </links>
5329                 <!--
5330                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5331                         But here's what it should look like if we ever do use pcrud.
5332                 -->
5333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5334                         <actions>
5335                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5336                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5337                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5338                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5339                         </actions>
5340                 </permacrud>
5341         </class>
5342
5343         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5345                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5346                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5347                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5348                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5349                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5350                 </fields>
5351                 <links>
5352                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5353                 </links>
5354                 <!--
5355                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5356                         But here's what it should look like if we ever do use pcrud.
5357                 -->
5358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5359                         <actions>
5360                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5361                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5362                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5363                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5364                         </actions>
5365                 </permacrud>
5366         </class>
5367
5368         <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">
5369                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5370                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5371                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5372                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5373                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5374                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5375                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5376                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5377                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5378                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5379                 </fields>
5380                 <links>
5381                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5382                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5383             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5384             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5385                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5386                 </links>
5387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5388             <actions>
5389                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5390                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5391                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5392                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5393             </actions>
5394         </permacrud>
5395         </class>
5396
5397         <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
5398                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5399                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5400                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5401                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5402                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5403                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5404                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5405                 </fields>
5406                 <links>
5407                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5408                 </links>
5409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5410                         <actions>
5411                                 <create permission="ADMIN_FUNDING_SOURCE">
5412                     <context link="funding_source" field="owner"/>
5413                 </create>
5414                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5415                     <context link="funding_source" field="owner"/>
5416                 </retrieve>
5417                                 <update permission="ADMIN_FUNDING_SOURCE">
5418                     <context link="funding_source" field="owner"/>
5419                 </update>
5420                                 <delete permission="ADMIN_FUNDING_SOURCE">
5421                     <context link="funding_source" field="owner"/>
5422                 </delete>
5423                         </actions>
5424                 </permacrud>
5425         </class>
5426
5427         <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">
5428                 <fields oils_persist:primary="id">
5429                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
5430                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
5431                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
5432                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
5433                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
5434                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5435                 </fields>
5436                 <links>
5437                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5438                 </links>
5439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5440                 </permacrud>
5441         </class>
5442
5443         <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
5444                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
5445                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
5446                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5447                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
5448                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
5449                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5450                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
5451                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
5452                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5453                 </fields>
5454                 <links>
5455                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5456                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5457                 </links>
5458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5459                         <actions>
5460                                 <create permission="ADMIN_ACQ_FUND">
5461                     <context link="fund" field="org"/>
5462                 </create>
5463                                 <retrieve permission="ADMIN_ACQ_FUND">
5464                     <context link="fund" field="org"/>
5465                 </retrieve>
5466                                 <update permission="ADMIN_ACQ_FUND">
5467                     <context link="fund" field="org"/>
5468                 </update>
5469                                 <delete permission="ADMIN_ACQ_FUND">
5470                     <context link="fund" field="org"/>
5471                 </delete>
5472                         </actions>
5473                 </permacrud>
5474         </class>
5475
5476         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5477                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5478                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5479                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5480                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5481                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5482                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5483                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5484                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5485                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5486                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5487                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5488                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5489                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5490                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5491                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5492                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5493                 </fields>
5494                 <links>
5495                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5496                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5497             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5498             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5499             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5500                 </links>
5501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502             <actions>
5503                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5504                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5505                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5506                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5507             </actions>
5508         </permacrud>
5509         </class>
5510
5511         <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">
5512                 <fields oils_persist:primary="fund">
5513                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5514                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5515                 </fields>
5516                 <links>
5517                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5518                 </links>
5519         </class>
5520
5521         <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">
5522                 <fields oils_persist:primary="fund">
5523                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5524                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5525                 </fields>
5526                 <links>
5527                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5528                 </links>
5529         </class>
5530
5531         <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">
5532                 <fields oils_persist:primary="fund">
5533                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5534                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5535                 </fields>
5536                 <links>
5537                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5538                 </links>
5539         </class>
5540
5541         <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">
5542                 <fields oils_persist:primary="fund">
5543                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5544                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5545                 </fields>
5546                 <links>
5547                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5548                 </links>
5549         </class>
5550
5551         <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">
5552                 <fields oils_persist:primary="fund">
5553                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5554                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5555                 </fields>
5556                 <links>
5557                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5558                 </links>
5559         </class>
5560
5561    <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">
5562         <fields oils_persist:primary="fund">
5563             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5564             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5565         </fields>
5566         <links>
5567             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5568         </links>
5569     </class>
5570
5571    <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">
5572         <fields oils_persist:primary="fund">
5573             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5574             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5575         </fields>
5576         <links>
5577             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5578         </links>
5579     </class>
5580
5581    <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">
5582         <fields oils_persist:primary="fund">
5583             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5584             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5585         </fields>
5586         <links>
5587             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5588         </links>
5589     </class>
5590
5591    <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">
5592         <fields oils_persist:primary="fund">
5593             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5594             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
5595         </fields>
5596         <links>
5597             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5598         </links>
5599     </class>
5600
5601    <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">
5602         <fields oils_persist:primary="fund">
5603             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5604             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5605         </fields>
5606         <links>
5607             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5608         </links>
5609     </class>
5610
5611         <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">
5612                 <fields oils_persist:primary="funding_source">
5613                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5614                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5615                 </fields>
5616                 <links>
5617                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5618                 </links>
5619         </class>
5620
5621         <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">
5622                 <fields oils_persist:primary="funding_source">
5623                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5624                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5625                 </fields>
5626                 <links>
5627                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5628                 </links>
5629         </class>
5630
5631         <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">
5632                 <fields oils_persist:primary="funding_source">
5633                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5634                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5635                 </fields>
5636                 <links>
5637                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5638                 </links>
5639         </class>
5640
5641         <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">
5642                 <fields oils_persist:primary="fund">
5643                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5644                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5645                 </fields>
5646                 <links>
5647                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5648                 </links>
5649         </class>
5650
5651         <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
5652                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5653                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5654                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5655                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5656                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5657                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5658                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5659                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5660                 </fields>
5661                 <links>
5662                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5663                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5664                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5665                 </links>
5666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5667                         <actions>
5668                                 <create permission="ADMIN_ACQ_FUND">
5669                     <context link="fund" field="org"/>
5670                 </create>
5671                                 <retrieve permission="ADMIN_ACQ_FUND">
5672                     <context link="fund" field="org"/>
5673                 </retrieve>
5674                                 <update permission="ADMIN_ACQ_FUND">
5675                     <context link="fund" field="org"/>
5676                 </update>
5677                                 <delete permission="ADMIN_ACQ_FUND">
5678                     <context link="fund" field="org"/>
5679                 </delete>
5680                         </actions>
5681                 </permacrud>
5682         </class>
5683
5684     <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">
5685         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5686             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5687             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5688             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5689             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5690             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5691             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5692             <field reporter:label="Note" name="note" reporter:datatype="text" />
5693             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5694         </fields>
5695         <links>
5696             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5697             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5698             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5699         </links>
5700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5701                         <actions>
5702                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5703                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5704                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5705                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5706                         </actions>
5707                 </permacrud>
5708     </class>
5709
5710         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
5711                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5712                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
5713                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5714                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
5715                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5716                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5717                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5718                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5719                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5720                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5721                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5722                 </fields>
5723                 <links>
5724                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5725                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5726                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5727                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5728                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5729                 </links>
5730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5731                         <actions>
5732                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
5733                         </actions>
5734                 </permacrud>
5735         </class>
5736
5737         <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">
5738                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5739                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5740                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5741                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5742                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5743                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
5744                 </fields>
5745                 <links>
5746                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5747                 </links>
5748                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5749                         <actions>
5750                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5751                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5752                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5753                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5754                         </actions>
5755                 </permacrud>
5756         </class>
5757
5758         <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">
5759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5760                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5761                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5762                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5763                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5764                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5765                         <field reporter:label="State" name="state" reporter:datatype="text" />
5766                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5767                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5768                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5769                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5770                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5771                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5772                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5773                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5774                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5775                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
5776                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5777                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5778                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
5779                 </fields>
5780                 <links>
5781                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5782                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5783                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5784                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5785                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5786                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5787                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
5788                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5789                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5791                 </links>
5792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5793                         <actions>
5794                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5795                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5796                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5797                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5798                         </actions>
5799                 </permacrud>
5800         </class>
5801
5802         <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">
5803                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5804                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5805                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5806                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5807                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5808                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5809                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5810                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5811                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5812                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5813                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5814                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5815                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5816                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5818                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5819                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5820                 </fields>
5821                 <links>
5822                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5823                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5824                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5825                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5826                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5827                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5828                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5829                 </links>
5830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5831             <actions>
5832                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5833             </actions>
5834                 </permacrud>
5835         </class>
5836
5837         <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
5838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5839                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5840                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5841                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5842                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5843                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5844                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5845                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5846                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5847                 </fields>
5848                 <links>
5849                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5850                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5851                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5852                 </links>
5853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5854             <actions>
5855                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5856                     <context link="purchase_order" field="ordering_agency"/>
5857                 </retrieve>
5858                 <create permission="CREATE_PURCHASE_ORDER">
5859                     <context link="purchase_order" field="ordering_agency"/>
5860                 </create>
5861                 <update permission="CREATE_PURCHASE_ORDER">
5862                     <context link="purchase_order" field="ordering_agency"/>
5863                 </update>
5864                 <delete permission="CREATE_PURCHASE_ORDER">
5865                     <context link="purchase_order" field="ordering_agency"/>
5866                 </delete>
5867             </actions>
5868                 </permacrud>
5869         </class>
5870
5871         <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">
5872                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
5873                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5874                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5875                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5876                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
5877                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5878                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
5879                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5880                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
5881                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
5882                 </fields>
5883                 <links>
5884                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5885                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5886                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5887                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5888                 </links>
5889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5890             <actions>
5891                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5892                     <context link="purchase_order" field="ordering_agency"/>
5893                 </retrieve>
5894                 <create permission="CREATE_PURCHASE_ORDER">
5895                     <context link="purchase_order" field="ordering_agency"/>
5896                 </create>
5897                 <update permission="CREATE_PURCHASE_ORDER">
5898                     <context link="purchase_order" field="ordering_agency"/>
5899                 </update>
5900                 <delete permission="CREATE_PURCHASE_ORDER">
5901                     <context link="purchase_order" field="ordering_agency"/>
5902                 </delete>
5903             </actions>
5904                 </permacrud>
5905         </class>
5906
5907         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5908                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5909                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5910                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5911                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
5912                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5913                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5914                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5915                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5916                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5917                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5918                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5919                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5920                         <field reporter:label="State" name="state" reporter:datatype="text" />
5921                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5922                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5923                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
5924                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5925                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5926                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5927                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5928                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5929                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5930                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
5931                         <field reporter:label="Envoice Enties" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
5932                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
5933                 </fields>
5934                 <links>
5935                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5936                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5937                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5938                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5939                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5940                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5941                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5942                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5943                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5944                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5945                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5946                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
5947                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5948                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
5949                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
5950                 </links>
5951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5952                         <actions>
5953                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5954                                         <context link="purchase_order" field="ordering_agency"/>
5955                                         <context link="picklist" field="org_unit"/>
5956                                 </retrieve>
5957                         </actions>
5958                 </permacrud>
5959         </class>
5960
5961         <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">
5962                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5963                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5964                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5965                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5966                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5967                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5968                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5969                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5970                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5971                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5972                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
5973                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5974                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5975                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5976                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5977                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5978                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5979                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5980                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
5981                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5982                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5983                 </fields>
5984                 <links>
5985                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5986                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5987                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5988                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5989                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5990                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5991                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5992                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5993                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5994                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5995                 </links>
5996                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5997                         <actions>
5998                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5999                                         <context link="purchase_order" field="ordering_agency"/>
6000                                         <context link="picklist" field="org_unit"/>
6001                                 </retrieve>
6002                         </actions>
6003                 </permacrud>
6004         </class>
6005
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6008                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6009                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6010                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6011                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6012                 </fields>
6013                 <links>
6014                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6015                 </links>
6016                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6017                         <actions>
6018                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6019                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6020                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6021                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6022                         </actions>
6023                 </permacrud>
6024         </class>
6025
6026         <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">
6027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6028                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6029                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6030                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6031                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6032                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6033                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6034                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6035                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6036                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6037                 </fields>
6038                 <links>
6039                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6040                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6041                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6042                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6043                 </links>
6044         </class>
6045
6046         <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">
6047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6048                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6049                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6050                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6051                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6052                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6053                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6054                 </fields>
6055                 <links>
6056                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6057                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6058                 </links>
6059         </class>
6060
6061         <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">
6062                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6063                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6064                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6065                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6066                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6067                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6068                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6069                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6070                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6071                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6072                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6073                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6074                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6075                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6076                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6077                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6078                 </fields>
6079                 <links>
6080                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6081                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6082                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6083                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6084                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6085                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6086                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6087                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6088                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6089                 </links>
6090         </class>
6091
6092         <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">
6093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6094                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6095                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6096                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6097                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6098                 </fields>
6099                 <links/>
6100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6101                         <actions>
6102                                 <retrieve />
6103                         </actions>
6104                 </permacrud>
6105         </class>
6106
6107         <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">
6108                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6109                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6110                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6111                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6112                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6113                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6114             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6115                 </fields>
6116                 <links/>
6117         <permacrud>
6118             <actions>
6119                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6120                 <retrieve />
6121                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6122                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6123             </actions>
6124         </permacrud>
6125         </class>
6126
6127         <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">
6128                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6129                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6130                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6131                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6132                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6133                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6134                 </fields>
6135                 <links/>
6136         </class>
6137         <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">
6138                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6139                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6140                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6141                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6142                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6143                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6144                 </fields>
6145                 <links>
6146                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6147                 </links>
6148         </class>
6149
6150         <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">
6151             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6152                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6153                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6154                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6155                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6156                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6157                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6158         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6159
6160             </fields>
6161             <links>
6162                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6163             </links>
6164             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6165                 <actions>
6166                     <create permission="ADMIN_PROVIDER">
6167                         <context link="provider" field="owner"/>
6168                     </create>
6169                     <retrieve permission="ADMIN_PROVIDER">
6170                         <context link="provider" field="owner"/>
6171                     </retrieve>
6172                     <update permission="ADMIN_PROVIDER">
6173                         <context link="provider" field="owner"/>
6174                     </update>
6175                     <delete permission="ADMIN_PROVIDER">
6176                         <context link="provider" field="owner"/>
6177                     </delete>
6178                 </actions>
6179             </permacrud>
6180         </class>
6181         
6182         <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">
6183             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6184                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6185                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6186                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6187                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6188             </fields>
6189             <links>
6190                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6191             </links>
6192             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6193                 <actions>
6194                     <create permission="ADMIN_PROVIDER">
6195                         <context link="provider" field="owner"/>
6196                     </create>
6197                     <retrieve permission="ADMIN_PROVIDER">
6198                         <context link="provider" field="owner"/>
6199                     </retrieve>
6200                     <update permission="ADMIN_PROVIDER">
6201                         <context link="provider" field="owner"/>
6202                     </update>
6203                     <delete permission="ADMIN_PROVIDER">
6204                         <context link="provider" field="owner"/>
6205                     </delete>
6206                 </actions>
6207             </permacrud>
6208         </class>
6209         
6210         <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">
6211             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6212                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6213                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6214                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6215                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6216                 </fields>
6217                 <links/>
6218         </class>
6219
6220         <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">
6221                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6222                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6223                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6224                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6225                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6226                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6227                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6228                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6229                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6230                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6231                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6232                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6233                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6234                 </fields>
6235                 <links>
6236                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6237                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6238                 </links>
6239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6240             <actions>
6241                 <create permission="ADMIN_PROVIDER">
6242                     <context link="provider" field="owner"/>
6243                 </create>
6244                 <retrieve permission="ADMIN_PROVIDER">
6245                     <context link="provider" field="owner"/>
6246                 </retrieve>
6247                 <update permission="ADMIN_PROVIDER">
6248                     <context link="provider" field="owner"/>
6249                 </update>
6250                 <delete permission="ADMIN_PROVIDER">
6251                     <context link="provider" field="owner"/>
6252                 </delete>
6253             </actions>
6254         </permacrud>
6255         </class>
6256
6257         <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">
6258                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6259                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6260                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6261                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6262                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6263                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6264                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6265                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6266                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6267                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6268                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6269                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6270                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6271                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6272                 </fields>
6273                 <links>
6274                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6275                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6276                 </links>
6277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6278             <actions>
6279                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6280                     <context link="account" jump="provider" field="owner"/>
6281                 </retrieve>
6282                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6283                     <context link="account" jump="provider" field="owner"/>
6284                 </update>
6285                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6286                     <context link="account" jump="provider" field="owner"/>
6287                 </delete>
6288             </actions>
6289         </permacrud>
6290         </class>
6291
6292
6293         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6294                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6295                         <field name="id" reporter:datatype="id" />
6296                         <field name="parent" reporter:datatype="link"/>
6297                         <field name="owner" reporter:datatype="link"/>
6298                         <field name="create_time" reporter:datatype="timestamp"/>
6299                         <field name="name" reporter:datatype="text"/>
6300                         <field name="shared" reporter:datatype="bool"/>
6301                         <field name="share_with" reporter:datatype="link"/>
6302                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6303                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6304                 </fields>
6305                 <links>
6306                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6307                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6308                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6309                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6310                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6311                 </links>
6312         </class>
6313         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6314                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6315                         <field name="id" reporter:datatype="id" />
6316                         <field name="parent" reporter:datatype="link"/>
6317                         <field name="owner" reporter:datatype="link"/>
6318                         <field name="create_time" reporter:datatype="timestamp"/>
6319                         <field name="name" reporter:datatype="text"/>
6320                         <field name="shared" reporter:datatype="bool"/>
6321                         <field name="share_with" reporter:datatype="link"/>
6322                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6323                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6324                 </fields>
6325                 <links>
6326                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6327                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6328                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6329                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6330                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6331                 </links>
6332         </class>
6333         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6334                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6335                         <field name="id" reporter:datatype="id" />
6336                         <field name="parent" reporter:datatype="link"/>
6337                         <field name="owner" reporter:datatype="link"/>
6338                         <field name="create_time" reporter:datatype="timestamp"/>
6339                         <field name="name" reporter:datatype="text"/>
6340                         <field name="shared" reporter:datatype="bool"/>
6341                         <field name="share_with" reporter:datatype="link"/>
6342                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6343                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6344                 </fields>
6345                 <links>
6346                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6347                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6348                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6349                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6350                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6351                 </links>
6352         </class>
6353         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6354                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6355                         <field name="id" reporter:datatype="id" />
6356                         <field name="owner" reporter:datatype="link"/>
6357                         <field name="create_time" reporter:datatype="timestamp"/>
6358                         <field name="name" reporter:datatype="text"/>
6359                         <field name="data" reporter:datatype="text"/>
6360                         <field name="folder" reporter:datatype="link"/>
6361                         <field name="description" reporter:datatype="text"/>
6362                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6363                 </fields>
6364                 <links>
6365                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6366                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6367                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6368                 </links>
6369         </class>
6370         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6371                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6372                         <field name="id" reporter:datatype="id" />
6373                         <field name="owner" reporter:datatype="link"/>
6374                         <field name="create_time" reporter:datatype="timestamp"/>
6375                         <field name="template" reporter:datatype="link"/>
6376                         <field name="data" reporter:datatype="link"/>
6377                         <field name="folder" reporter:datatype="link"/>
6378                         <field name="recur" reporter:datatype="bool"/>
6379                         <field name="recurrence" reporter:datatype="interval"/>
6380                         <field name="name" reporter:datatype="text"/>
6381                         <field name="description" reporter:datatype="text"/>
6382                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6383                 </fields>
6384                 <links>
6385                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6386                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6387                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6388                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6389                 </links>
6390         </class>
6391         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6392                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6393                         <field name="id" reporter:datatype="id" />
6394                         <field name="runner" reporter:datatype="link"/>
6395                         <field name="start_time" reporter:datatype="timestamp"/>
6396                         <field name="complete_time" reporter:datatype="timestamp"/>
6397                         <field name="run_time" reporter:datatype="timestamp"/>
6398                         <field name="email" reporter:datatype="text"/>
6399                         <field name="excel_format" reporter:datatype="bool"/>
6400                         <field name="csv_format" reporter:datatype="bool"/>
6401                         <field name="html_format" reporter:datatype="bool"/>
6402                         <field name="error_code" reporter:datatype="int"/>
6403                         <field name="error_text" reporter:datatype="text"/>
6404                         <field name="report" reporter:datatype="link"/>
6405                         <field name="folder" reporter:datatype="link"/>
6406                         <field name="chart_pie" reporter:datatype="bool"/>
6407                         <field name="chart_bar" reporter:datatype="bool"/>
6408                         <field name="chart_line" reporter:datatype="bool"/>
6409                 </fields>
6410                 <links>
6411                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6412                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6413                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6414                 </links>
6415         </class>
6416         <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">
6417                 <fields oils_persist:primary="id">
6418                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6419                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6420                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6421                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6422                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6423                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6424                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6425                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6426                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6427                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6428                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6429                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6430                 </fields>
6431                 <links>
6432                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6433                 </links>
6434         </class>
6435         <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">
6436                 <fields oils_persist:primary="id">
6437                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6438                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6439                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6440                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6441                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6442                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6443                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6444                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6445                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6446                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6447                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6448                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6449                 </fields>
6450                 <links>
6451                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6452                 </links>
6453         </class>
6454         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
6455                 <fields oils_persist:primary="id">
6456                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6457                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
6458                         <field reporter:label="Fingerprint" name="fingerprint" />
6459                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6460                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6461                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6462                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6463                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
6464                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6465                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6466                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6467                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
6468                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
6469                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
6470                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6471                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6472                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
6473                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
6474                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
6475                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
6476                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
6477                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
6478                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6479                 </fields>
6480                 <links>
6481                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
6482                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6483                 </links>
6484         </class>
6485         <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">
6486                 <fields oils_persist:primary="id">
6487                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
6488                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
6489                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
6490                 </fields>
6491                 <links>
6492                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
6493                 </links>
6494         </class>
6495         <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">
6496                 <fields oils_persist:primary="id">
6497                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
6498                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
6499                 </fields>
6500                 <links>
6501                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
6502                 </links>
6503         </class>
6504         <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">
6505                 <fields oils_persist:primary="id">
6506                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6507                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
6508                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
6509                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
6510                 </fields>
6511                 <links>
6512                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
6513                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
6514                 </links>
6515         </class>
6516         <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">
6517                 <fields oils_persist:primary="xact">
6518                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6519                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
6520                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
6521                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
6522                 </fields>
6523                 <links>
6524                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6525                 </links>
6526         </class>
6527         <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">
6528                 <fields oils_persist:primary="xact">
6529                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6530                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6531                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6532                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6533                 </fields>
6534                 <links>
6535                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6536                 </links>
6537         </class>
6538         <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)">
6539                 <fields oils_persist:primary="id">
6540                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6541                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6542                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6543                 </fields>
6544                 <links>
6545                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6546                 </links>
6547         </class>
6548         <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">
6549                 <fields oils_persist:primary="id">
6550                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6551                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6552                 </fields>
6553                 <links>
6554                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6555                 </links>
6556         </class>
6557         <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">
6558                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6559                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6560                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6561                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6562                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6563                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6564                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6565                 </fields>
6566                 <links>
6567                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6568                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6569                 </links>
6570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6571                         <actions>
6572                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6573                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6574                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6575                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6576                         </actions>
6577                 </permacrud>
6578         </class>
6579         <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">
6580                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
6581                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
6582                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
6583                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
6584                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
6585                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6586                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6587                 </fields>
6588                 <links>
6589                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6590                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6591                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6592                 </links>
6593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6594                         <actions>
6595                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
6596                                         <context link="formula" field="owner"/>
6597                                 </create>
6598                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
6599                                         <context link="formula" field="owner"/>
6600                                 </retrieve>
6601                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
6602                                         <context link="formula" field="owner"/>
6603                                 </update>
6604                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
6605                                         <context link="formula" field="owner"/>
6606                                 </delete>
6607                         </actions>
6608                 </permacrud>
6609         </class>
6610
6611         <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">
6612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
6613                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6614                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6615                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6616                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
6617                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
6618                 </fields>
6619                 <links>
6620                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6621                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6622                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6623                 </links>
6624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6625                         <actions>
6626                                 <create permission="CREATE_PURCHASE_ORDER">
6627                                         <context link="formula" field="owner"/>
6628                 </create>
6629                                 <retrieve permission="CREATE_PURCHASE_ORDER">
6630                                         <context link="formula" field="owner"/>
6631                 </retrieve>
6632                                 <update permission="CREATE_PURCHASE_ORDER">
6633                                         <context link="formula" field="owner"/>
6634                 </update>
6635                                 <delete permission="CREATE_PURCHASE_ORDER">
6636                                         <context link="formula" field="owner"/>
6637                 </delete>
6638                         </actions>
6639                 </permacrud>
6640         </class>
6641
6642         <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">
6643                 <fields oils_persist:primary="id">
6644                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
6645                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6646                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
6647                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
6648                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
6649                 </fields>
6650                 <links>
6651                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6652                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6653                 </links>
6654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6655                 </permacrud>
6656         </class>
6657
6658         <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">
6659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
6660                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6661                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6663                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6664                 </fields>
6665                 <links>
6666                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6667                 </links>
6668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6669                         <actions>
6670                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6671                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6672                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6673                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6674                         </actions>
6675                 </permacrud>
6676         </class>
6677
6678         <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">
6679                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
6680                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6681                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6682                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6683                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6684                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
6685                 </fields>
6686                 <links>
6687                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6688                 </links>
6689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6690                         <actions>
6691                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6692                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6693                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6694                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6695                         </actions>
6696                 </permacrud>
6697         </class>
6698
6699         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
6700                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
6701                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6702                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6703                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
6704                 </fields>
6705                 <links>
6706                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6707                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
6708                 </links>
6709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6710                 </permacrud>
6711         </class>
6712
6713         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
6714                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
6715                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6716                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6717                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6718                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6719                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6720                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6721                 </fields>
6722                 <links>
6723                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6724                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
6725                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6726                 </links>
6727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6728                 </permacrud>
6729         </class>
6730
6731         <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">
6732                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
6733                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6734                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6735                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
6736                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6737                 </fields>
6738                 <links>
6739                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6740                 </links>
6741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6742             <actions>
6743                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6744                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
6745                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6746                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6747             </actions>
6748                 </permacrud>
6749         </class>
6750
6751         <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">
6752                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
6753                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
6754                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
6755                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
6756                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
6757                 </fields>
6758                 <links>
6759                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6760                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
6761                 </links>
6762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6763                         <actions>
6764                                 <create permission="ADMIN_CLAIM_POLICY">
6765                                         <context link="claim_policy" field="org_unit"/>
6766                 </create>
6767                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
6768                                         <context link="claim_policy" field="org_unit"/>
6769                 </retrieve>
6770                                 <update permission="ADMIN_CLAIM_POLICY">
6771                                         <context link="claim_policy" field="org_unit"/>
6772                 </update>
6773                                 <delete permission="ADMIN_CLAIM_POLICY">
6774                                         <context link="claim_policy" field="org_unit"/>
6775                 </delete>
6776                         </actions>
6777                 </permacrud>
6778         </class>
6779
6780     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
6781         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
6782             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6783             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6784             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6785             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
6786             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6787             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
6788             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
6789             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
6790             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
6791             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
6792             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
6793             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
6794             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
6795             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
6796             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6797         </fields>
6798     </class>
6799
6800     <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">
6801         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
6802             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6803             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6804             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6805             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6806             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6807         </fields>
6808     </class>
6809
6810     <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">
6811         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
6812             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6813             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6814             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6815             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6816             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6817             <field reporter:label="City" name="city" reporter:datatype="text"/>
6818             <field reporter:label="State" name="state" reporter:datatype="text"/>
6819             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6820             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6821             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6822         </fields>
6823     </class>
6824
6825     <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">
6826         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
6827             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6828             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6829             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6830             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6831             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6832             <field reporter:label="City" name="city" reporter:datatype="text"/>
6833             <field reporter:label="State" name="state" reporter:datatype="text"/>
6834             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6835             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6836             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6837         </fields>
6838     </class>
6839
6840     <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">
6841         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6842             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6843             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6844             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6845             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6846             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6847             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6848         </fields>
6849     </class>
6850
6851         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
6852                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
6853                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
6854                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6855                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6856                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6857                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
6858                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
6859                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
6860                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
6861                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
6862                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
6863                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
6864                 </fields>
6865                 <links>
6866                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6867                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6868                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6869                 </links>
6870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6871                 </permacrud>
6872         </class>
6873
6874         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
6875                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
6876                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
6877                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
6878                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
6879                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
6880                 </fields>
6881                 <links>
6882                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
6883                 </links>
6884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6885                 </permacrud>
6886         </class>
6887
6888     <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">
6889         <fields>
6890             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6891             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6892             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6893         </fields>
6894                 <links>
6895                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6896                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6897                 </links>
6898     </class>
6899
6900     <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">
6901         <fields>
6902             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6903             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6904         </fields>
6905                 <links>
6906                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6907                 </links>
6908     </class>
6909
6910     <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">
6911         <fields>
6912             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6913             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6914             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6915         </fields>
6916                 <links>
6917                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6918                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6919                 </links>
6920     </class>
6921
6922     <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">
6923         <fields>
6924             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6925             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6926         </fields>
6927                 <links>
6928                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6929                 </links>
6930     </class>
6931
6932     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6933                 <oils_persist:source_definition>
6934
6935             SELECT  DISTINCT l.*
6936               FROM  action.unfulfilled_hold_loops l
6937                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6938               WHERE l.count = m.max
6939
6940                 </oils_persist:source_definition>
6941         <fields>
6942             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6943             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6944             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6945         </fields>
6946                 <links>
6947                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6948                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6949                 </links>
6950     </class>
6951
6952         <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">
6953                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6954                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6955                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6956                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6957                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6958                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
6959                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
6960                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
6961                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
6962                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
6963                 </fields>
6964                 <links>
6965                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
6966                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
6967                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
6968                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
6969                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
6970                 </links>
6971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6972                 </permacrud>
6973         </class>
6974
6975         <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">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6977                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6978                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6979                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6980                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6981                 </fields>
6982                 <links>
6983                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6984                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6985                 </links>
6986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6987                 </permacrud>
6988         </class>
6989
6990         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6991                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6992                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6993                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6994                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6995                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6996                 </fields>
6997                 <links>
6998                 </links>
6999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7000                 </permacrud>
7001         </class>
7002
7003         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7004                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7005                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7006                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7007                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7008                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7009                 </fields>
7010                 <links>
7011                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7012                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7013                 </links>
7014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7015                 </permacrud>
7016         </class>
7017         
7018         <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">
7019                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7020                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7021                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7022                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7023                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7024                 </fields>
7025                 <links>
7026                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7027                 </links>
7028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7029                 </permacrud>
7030         </class>
7031         
7032         <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">
7033                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7034                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7035                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7036                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7037                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7038                 </fields>
7039                 <links>
7040                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7041                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7042                 </links>
7043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044                 </permacrud>
7045         </class>
7046
7047         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
7048                 <fields oils_persist:primary="name">
7049                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7050                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7051                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7052                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7053                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7054                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7055                 </fields>
7056                 <links>
7057                 </links>
7058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7059                 </permacrud>
7060         </class>
7061
7062         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7063                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7064                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7065                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7066                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7067                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7068                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7069                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7070                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7071                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7072                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7073                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7074                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7075                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7076                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7077                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7078                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7079                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7080                 </fields>
7081                 <links>
7082                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7083                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7084                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7085                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7086                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7087                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7088                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7089                 </links>
7090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7091                 </permacrud>
7092         </class>
7093
7094         <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">
7095                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
7096                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7097                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7098                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7099                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7100                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7101                 </fields>
7102                 <links>
7103                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7104                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7105                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7106                 </links>
7107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7108                 </permacrud>
7109         </class>
7110
7111         <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">
7112                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
7113                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7114                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7115                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7116                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7117                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7118                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7119                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7120                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7121                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7122                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7123                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7124                 </fields>
7125                 <links>
7126                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7127                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7128                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7129                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7130                 </links>
7131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7132                 </permacrud>
7133         </class>
7134
7135         <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">
7136                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
7137                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7138                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7139                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7140                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7141                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7142                 </fields>
7143                 <links>
7144                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7145                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7146                 </links>
7147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7148                 </permacrud>
7149         </class>
7150
7151         <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">
7152                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
7153                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7154                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7155                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7156                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7157                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7158                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7159                 </fields>
7160                 <links>
7161                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7162                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7163                 </links>
7164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7165                 </permacrud>
7166         </class>
7167
7168         <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">
7169                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
7170                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7171                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7172                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7173                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7174                 </fields>
7175                 <links>
7176                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7177                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7178                 </links>
7179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7180                 </permacrud>
7181         </class>
7182
7183         <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">
7184                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7185                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7186                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7187                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7188                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7189                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7190                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7191                 </fields>
7192                 <links>
7193                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7194                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7195                 </links>
7196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7197                 </permacrud>
7198         </class>
7199
7200         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
7201                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7202                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7203                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7204                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7205                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7206                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7207                 </fields>
7208                 <links>
7209                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7210                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7211                 </links>
7212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7213                 </permacrud>
7214         </class>
7215
7216         <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">
7217                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7218                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7219                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7220                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7221                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7222                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7223                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7224                 </fields>
7225                 <links>
7226                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7227                 </links>
7228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7229                 </permacrud>
7230         </class>
7231
7232         <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">
7233                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7234                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7235                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7236                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7237                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7238                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7239                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7240                 </fields>
7241                 <links>
7242                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7243                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7244                 </links>
7245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7246                 </permacrud>
7247         </class>
7248
7249         <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">
7250                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7251                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7252                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7253                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7254                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7255                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7256                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7257                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7258                 </fields>
7259                 <links>
7260                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7261                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7262                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7263                 </links>
7264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7265                 </permacrud>
7266         </class>
7267
7268         <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">
7269                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7270                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7271                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7272                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7273                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7274                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7275                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7276                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7277                 </fields>
7278                 <links>
7279                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7280                 </links>
7281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7282                 </permacrud>
7283         </class>
7284
7285         <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">
7286                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7287                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7288                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7289                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7290                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7291                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7292                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7293                 </fields>
7294                 <links>
7295                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7296                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7297                 </links>
7298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7299                 </permacrud>
7300         </class>
7301
7302         <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">
7303                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7304                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7305                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7306                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7307                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7308                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7309                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7310                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7311                 </fields>
7312                 <links>
7313                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7314                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7315                 </links>
7316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7317                 </permacrud>
7318         </class>
7319
7320         <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">
7321                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7322                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7323                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7324                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7325                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7326                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7327                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7328                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7329                 </fields>
7330                 <links>
7331                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7332                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7333                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7334                 </links>
7335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7336                 </permacrud>
7337         </class>
7338
7339         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
7340                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7341                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7342                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7343                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7344                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7345                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7346                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7347                 </fields>
7348                 <links>
7349                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7350                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7351                 </links>
7352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7353                 </permacrud>
7354         </class>
7355
7356         <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">
7357                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7358                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7359                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7360                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7361                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7362                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7363                 </fields>
7364                 <links>
7365                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7366                 </links>
7367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7368                 </permacrud>
7369         </class>
7370
7371         <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">
7372                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7373                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7374                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7375                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7376                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7377                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7378                 </fields>
7379                 <links>
7380                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7381                 </links>
7382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7383                 </permacrud>
7384         </class>
7385
7386         <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">
7387                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7388                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7389                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7390                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7391                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7392                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7393                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7394                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7395                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7396                 </fields>
7397                 <links>
7398                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7399                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7400                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7401                 </links>
7402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7403                 </permacrud>
7404         </class>
7405
7406         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
7407                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7408                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7409                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7410                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7411                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7412                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7413                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7414                 </fields>
7415                 <links>
7416                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7417                 </links>
7418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7419                 </permacrud>
7420         </class>
7421
7422         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7424                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7425                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7426                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7427                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7428                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7429                 </fields>
7430                 <links>
7431                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7432                 </links>
7433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7434                 </permacrud>
7435         </class>
7436
7437         <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">
7438                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7439                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7440                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7441                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7442                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7443                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7444                 </fields>
7445                 <links>
7446                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7447                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7448                 </links>
7449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7450                 </permacrud>
7451         </class>
7452
7453         <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">
7454                 <fields oils_persist:primary="id">
7455                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
7456                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
7457                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
7458                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
7459                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
7460                 </fields>
7461                 <links>
7462                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
7463                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7464                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
7465                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7466                 </links>
7467         </class>
7468
7469         <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">
7470                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
7471                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7472                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
7473                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
7474                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
7475                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7476                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7477                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
7478                 </fields>
7479                 <links/>
7480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7481                         <actions>
7482                                 <retrieve/>
7483                         </actions>
7484                 </permacrud>
7485         </class>
7486
7487         <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">
7488                 <fields oils_persist:primary="ptype_key">
7489                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
7490                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7491                 </fields>
7492                 <links/>
7493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7494                         <actions>
7495                                 <retrieve/>
7496                         </actions>
7497                 </permacrud>
7498         </class>
7499
7500         <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">
7501                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
7502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7503                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
7504                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
7505                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7506                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7507                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7508                 </fields>
7509                 <links>
7510                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
7511                 </links>
7512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7513                         <actions>
7514                                 <retrieve/>
7515                         </actions>
7516                 </permacrud>
7517         </class>
7518
7519         <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">
7520                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
7521                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7522                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
7523                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
7524                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7525                 </fields>
7526                 <links>
7527                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7528                 </links>
7529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7530                         <actions>
7531                                 <retrieve/>
7532                         </actions>
7533                 </permacrud>
7534         </class>
7535
7536         <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">
7537                 <fields oils_persist:primary="code">
7538                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
7539                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
7540                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
7541                 </fields>
7542                 <links/>
7543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7544                         <actions>
7545                                 <retrieve/>
7546                         </actions>
7547                 </permacrud>
7548         </class>
7549
7550         <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">
7551                 <oils_persist:source_definition>
7552
7553             SELECT  b.id,
7554                     MAX(dcp.edit_date) AS last_delete_date
7555              FROM   biblio.record_entry b
7556                     JOIN asset.call_number cn ON (cn.record = b.id)
7557                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
7558              WHERE  NOT b.deleted
7559              GROUP BY b.id
7560              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
7561
7562                 </oils_persist:source_definition>
7563                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7564                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7565                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
7566                 </fields>
7567                 <links>
7568                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7569                 </links>
7570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7571                         <actions>
7572                                 <retrieve/>
7573                         </actions>
7574                 </permacrud>
7575         </class>
7576
7577         <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
7578                 <oils_persist:source_definition>
7579
7580             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
7581             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
7582             -- -- may not.
7583             -- SELECT
7584             --     bre.id AS "bib_id",
7585             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
7586             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
7587             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
7588             -- FROM (
7589                 SELECT
7590                     y.bre AS "id",
7591                     COALESCE( x.copy_count, 0 ) AS "copy_count",
7592                     y.hold_count AS "hold_count",
7593                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS "hold_copy_ratio"
7594                 FROM (
7595                         SELECT
7596                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
7597                             COUNT(*) AS "hold_count"
7598                         FROM action.hold_request h
7599                         WHERE
7600                             cancel_time IS NULL
7601                             AND fulfillment_time IS NULL
7602                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
7603                         GROUP BY 1
7604                     )y LEFT JOIN (
7605                         SELECT 
7606                             (SELECT id
7607                                 FROM biblio.record_entry 
7608                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
7609                             ) AS "bre", 
7610                             COUNT(*) AS "copy_count"
7611                         FROM asset.copy
7612                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
7613                         WHERE copy.holdable 
7614                             AND NOT copy.deleted 
7615                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
7616                         GROUP BY 1
7617                     )x ON x.bre = y.bre
7618                 -- )z RIGHT JOIN (
7619                 --     SELECT id
7620                 --     FROM biblio.record_entry
7621                 --     WHERE NOT deleted
7622                 -- )bre ON (z.bib_id = bre.id)
7623                 
7624
7625                 </oils_persist:source_definition>
7626                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7627                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7628                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
7629                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
7630                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
7631                 </fields>
7632                 <links>
7633                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7634                 </links>
7635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7636                         <actions>
7637                                 <retrieve/>
7638                         </actions>
7639                 </permacrud>
7640         </class>
7641
7642         <!-- ********************************************************************************************************************* -->
7643         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
7644         <!-- ********************************************************************************************************************* -->
7645         <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">
7646                 <fields oils_persist:primary="id">
7647                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
7648                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
7649                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
7650                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7651                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
7652                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
7653                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7654                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
7655                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
7656                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
7657                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
7658                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
7659                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
7660                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
7661                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7662                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
7663                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
7664                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
7665                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
7666                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
7667                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
7668                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
7669                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
7670                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
7671                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
7672                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
7673                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
7674                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
7675                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
7676                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7677                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7678                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7679                 </fields>
7680                 <links>
7681                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7682                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
7683                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
7684                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
7685                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7686                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
7687                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
7688                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
7689                 </links>
7690         </class>
7691
7692         <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">
7693                 <fields oils_persist:primary="id">
7694                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7695                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7696                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7697                 </fields>
7698                 <links>
7699                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7700                 </links>
7701         </class>
7702
7703         <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">
7704                 <fields oils_persist:primary="id">
7705                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7706                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7707                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7708                 </fields>
7709                 <links>
7710                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7711                 </links>
7712         </class>
7713
7714         <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">
7715                 <fields oils_persist:primary="id">
7716                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7717
7718                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
7719                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
7720                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
7721
7722                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
7723                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
7724                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
7725
7726                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
7727                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
7728
7729                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7730                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7731                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
7732
7733                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
7734                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
7735
7736                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
7737                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
7738                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
7739
7740                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
7741                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
7742                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
7743
7744                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7745                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
7746                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
7747                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
7748
7749                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
7750                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
7751
7752                 </fields>
7753                 <links>
7754                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
7755                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7756                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7757                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7758                 </links>
7759         </class>
7760
7761         <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
7762                 <oils_persist:source_definition>
7763
7764             SELECT
7765                 po.ordering_agency AS ordering_agency,
7766                 po.id AS purchase_order,
7767                 li.id AS lineitem,
7768                 lid.id AS lineitem_detail,
7769                 cpa.id AS claim_policy_action
7770             FROM
7771                 acq.lineitem_detail lid
7772                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
7773                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
7774                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
7775                 JOIN acq.claim_policy_action cpa ON (
7776                     cpa.claim_policy = cp.id
7777
7778                     -- we only care about claim policy actions whose claim
7779                     -- interval we'd reached or exceeded
7780                     AND (NOW() - cpa.action_interval) &gt; po.order_date
7781
7782                     -- filter out all claim policy actions where claim events
7783                     -- have occurred on or after the action's action_interval
7784                     AND NOT EXISTS (
7785                         SELECT 1
7786                         FROM
7787                             acq.claim_event evt
7788                             JOIN acq.claim claim ON (
7789                                 claim.id = evt.claim
7790                                 AND claim.lineitem_detail = lid.id
7791                             )
7792                         WHERE
7793                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
7794                     )
7795                 )
7796             WHERE
7797                 lid.cancel_reason IS NULL
7798                 AND li.cancel_reason IS NULL -- belt/suspenders
7799                 AND po.cancel_reason IS NULL -- belt/suspenders
7800                 AND lid.recv_time IS NULL
7801                 AND po.state = 'on-order'
7802             ORDER BY 1, 2, 3, 4, 5
7803
7804                 </oils_persist:source_definition>
7805                 <fields>
7806                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7807                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7808                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7809                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7810                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
7811                 </fields>
7812                 <links>
7813                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7814                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7815                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7816                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7817                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
7818                 </links>
7819         </class>
7820
7821         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
7822                 <oils_persist:source_definition>
7823
7824             SELECT 
7825                 li.id AS lineitem, 
7826                 (
7827                     SELECT COUNT(lid.id) 
7828                     FROM acq.lineitem_detail lid
7829                     WHERE lineitem = li.id
7830                 ) AS item_count,
7831                 (
7832                     SELECT COUNT(lid.id) 
7833                     FROM acq.lineitem_detail lid
7834                     WHERE recv_time IS NOT NULL AND lineitem = li.id
7835                 ) AS recv_count,
7836                 (
7837                     SELECT COUNT(lid.id) 
7838                     FROM acq.lineitem_detail lid
7839                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
7840                 ) AS cancel_count,
7841                 (
7842                     SELECT COUNT(lid.id) 
7843                     FROM acq.lineitem_detail lid
7844                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7845                     WHERE NOT debit.encumbrance AND lineitem = li.id
7846                 ) AS invoice_count,
7847                 (
7848                     SELECT COUNT(DISTINCT(lid.id)) 
7849                     FROM acq.lineitem_detail lid
7850                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
7851                     WHERE lineitem = li.id
7852                 ) AS claim_count,
7853                 (
7854                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
7855                     FROM acq.lineitem_detail lid
7856                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
7857                 ) AS estimated_amount,
7858                 (
7859                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7860                     FROM acq.lineitem_detail lid
7861                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7862                     WHERE debit.encumbrance AND lineitem = li.id
7863                 ) AS encumbrance_amount,
7864                 (
7865                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7866                     FROM acq.lineitem_detail lid
7867                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7868                     WHERE NOT debit.encumbrance AND lineitem = li.id
7869                 ) AS paid_amount
7870
7871                 FROM acq.lineitem AS li
7872         </oils_persist:source_definition>
7873                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
7874                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7875                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7876                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
7877                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
7878                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
7879                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
7880                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
7881                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
7882                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
7883                 </fields>
7884                 <links>
7885                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7886                 </links>
7887     </class>
7888
7889
7890         <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">
7891                 <oils_persist:source_definition>
7892
7893                         SELECT  t.*
7894                           FROM  action.transit_copy t
7895                                 JOIN actor.org_unit AS s ON (t.source = s.id)
7896                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
7897                           WHERE s.parent_ou &lt;&gt; d.parent_ou
7898
7899                 </oils_persist:source_definition>
7900                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7901                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
7902                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
7903                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7904                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
7905                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
7906                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
7907                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
7908                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7909                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7910                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7911                 </fields>
7912                 <links>
7913                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
7914                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7915                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7916                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7917                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7918                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
7919                 </links>
7920         </class>
7921
7922     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
7923                 <oils_persist:source_definition>
7924
7925         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
7926                 SELECT
7927                         cp.id as copy,
7928                         COUNT(circ.id),
7929                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7930                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7931                 FROM
7932                         asset.copy cp
7933                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
7934                 GROUP BY 1, 3, 4
7935                 UNION
7936                 SELECT
7937                         cp.id as copy,
7938                         COUNT(circ.id),
7939                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7940                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7941                 FROM
7942                         asset.copy cp
7943                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
7944                 GROUP BY 1, 3, 4
7945                 UNION
7946                 SELECT
7947                         id as copy,
7948                         circ_count,
7949                         -1 AS year,
7950                         false as is_renewal
7951                 FROM
7952                         extend_reporter.legacy_circ_count
7953         )x GROUP BY 1, 3, 4
7954
7955                 </oils_persist:source_definition>
7956         <fields>
7957             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
7958             <field reporter:label="Count" name="count" reporter:datatype="int"/>
7959             <field reporter:label="Year" name="year" reporter:datatype="int"/>
7960             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
7961         </fields>
7962                 <links>
7963                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7964                 </links>
7965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7966                         <actions>
7967                                 <retrieve/>
7968                         </actions>
7969                 </permacrud>
7970     </class>
7971
7972         <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">
7973                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7974                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
7975                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
7976                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
7977                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7978                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
7979                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
7980                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
7981                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
7982                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
7983                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
7984                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
7985                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
7986                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
7987                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
7988                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
7989                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
7990                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
7991                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
7992                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
7993                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
7994                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
7995                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
7996                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
7997                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
7998                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7999                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8000                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8001                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8002                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8003                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8004                 </fields>
8005                 <links>
8006                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8007                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8008                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8009                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8010                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8011                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8012                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8013                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8014                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8015                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8016                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8017                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8018                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8019                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8020                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8021                 </links>
8022         </class>
8023
8024     <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">
8025         <fields oils_persist:primary="id">
8026             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8027             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8028             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8029             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8030             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8031             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8032             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8033             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8034             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8035             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8036             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8037             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8038             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8039             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8040             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8041             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8042             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8043             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8044             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8045             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8046             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8047             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8048             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8049             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8050             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8051             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8052             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8053             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8054             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8055             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8056             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8057             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8058             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8059             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8060         </fields>
8061         <links>
8062             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8063             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8064             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8065             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8066             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8067         </links>
8068     </class>
8069
8070     <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">
8071         <fields oils_persist:primary="id">
8072             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8073             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8074             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8075             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8076         </fields>
8077         <links>
8078             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8079             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8080         </links>
8081     </class>
8082
8083     <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">
8084         <fields oils_persist:primary="owning_lib">
8085             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8086             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8087             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8088         </fields>
8089         <links>
8090             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8091         </links>
8092     </class>
8093
8094     <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">
8095         <fields oils_persist:primary="id">
8096             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8097             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8098             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8099             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8100             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8101         </fields>
8102         <links>
8103             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8104             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8105             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8106         </links>
8107     </class>
8108
8109     <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">
8110         <fields oils_persist:primary="circ_lib">
8111             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8112             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8113             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8114             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8115         </fields>
8116         <links>
8117             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8118             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8119         </links>
8120     </class>
8121
8122     <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">
8123         <fields oils_persist:primary="id">
8124             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8125             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8126             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8127             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8128             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8129         </fields>
8130         <links>
8131             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8132             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8133             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8134         </links>
8135     </class>
8136
8137     <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">
8138         <fields oils_persist:primary="home_ou">
8139             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8140             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8141             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8142             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8143         </fields>
8144         <links>
8145             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8146             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8147         </links>
8148     </class>
8149         <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">
8150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8151                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8152                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8153                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8154                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8155                 </fields>
8156                 <links>
8157                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8158                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8159                 </links>
8160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161                         <actions>
8162                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8163                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8164                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8165                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8166                         </actions>
8167                 </permacrud>
8168         </class>
8169         <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">
8170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8171                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8172                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8173                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8174                 </fields>
8175                 <links>
8176                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8177                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8178                         </links>
8179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8180                 <actions>
8181                                 <create permission="ADMIN_ACQ_FUND_TAG">
8182                                         <context link="tag" field="owner"/>
8183                                 </create>
8184                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8185                                         <context link="tag" field="owner"/>
8186                                 </retrieve>
8187                                 <update permission="ADMIN_ACQ_FUND_TAG">
8188                                         <context link="tag" field="owner"/>
8189                                 </update>
8190                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8191                                         <context link="tag" field="owner"/>
8192                                 </delete>
8193                         </actions>
8194                 </permacrud>
8195         </class>
8196
8197         <!-- ********************************************************************************************************************* -->
8198
8199 </IDL>
8200
8201 <!--
8202     vim:noet:ts=4:sw=4:
8203 -->