]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
03fa1dcb85659503a612340463a4918aed7f5418
[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="Permission Group" name="grp" reporter:datatype="link"/>
1053                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1054                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1055                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1056                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1057                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1058                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1059                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1060                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1061                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1062                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1063                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1064                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1065                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1066                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1067                 </fields>
1068                 <links>
1069                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1070                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1071                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1072                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1073                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1074                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1075                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1076                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1077                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1078                 </links>
1079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1080             <actions>
1081                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1082                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1083                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1084                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1085             </actions>
1086         </permacrud>
1087         </class>
1088
1089         <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">
1090                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1091                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1092                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1093                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1094                 </fields>
1095                 <links>
1096                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1097                 </links>
1098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1099             <actions>
1100                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1101                     <context link="matchpoint" field="org_unit"/>
1102                 </create>
1103                 <retrieve/>
1104                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1105                     <context link="matchpoint" field="org_unit"/>
1106                 </update>
1107                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1108                     <context link="matchpoint" field="org_unit"/>
1109                 </delete>
1110             </actions>
1111         </permacrud>
1112         </class>
1113
1114         <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">
1115                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1116                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1117                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1118                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1119                 </fields>
1120                 <links>
1121                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1122                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1123                 </links>
1124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1125             <actions>
1126                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1127                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1128                 </create>
1129                 <retrieve/>
1130                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1131                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1132                 </update>
1133                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1134                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1135                 </delete>
1136             </actions>
1137         </permacrud>
1138         </class>
1139
1140         <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">
1141                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1142                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1143                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1144                 </fields>
1145                 <links/>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1151                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <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">
1157                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1158                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1159                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1160                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1161                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1162                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1163                 </fields>
1164                 <links>
1165                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1166                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1167                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1168                 </links>
1169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1170             <actions>
1171                 <create permission="ADMIN_SURVEY">
1172                     <context link="survey" field="owner"/>
1173                 </create>
1174                 <retrieve/>
1175                 <update permission="ADMIN_SURVEY">
1176                     <context link="survey" field="owner"/>
1177                 </update>
1178                 <delete permission="ADMIN_SURVEY">
1179                     <context link="survey" field="owner"/>
1180                 </delete>
1181             </actions>
1182         </permacrud>
1183         </class>
1184         <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">
1185                 <fields oils_persist:primary="id" oils_persist:sequence="">
1186                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1187                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1188                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1189                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1190                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1191                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1192                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1193                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1194                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1195                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1196                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1197                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1198                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1199                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1200                 </fields>
1201                 <links>
1202                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1203                 </links>
1204         </class>
1205         <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">
1206                 <fields oils_persist:primary="id" oils_persist:sequence="">
1207                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1208                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1209                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1210                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1211                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1212                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1213                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1214                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1215                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1216                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1217                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1218                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1219                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1220                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1221                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1222                 </fields>
1223                 <links>
1224                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1225                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1226                 </links>
1227         </class>
1228         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1229                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1230                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1231                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1232                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1233                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1234                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1235                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1236                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1237                 </fields>
1238                 <links>
1239                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1240                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1241                 </links>
1242         </class>
1243         <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">
1244                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1245                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1246                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1247                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1248                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1249                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1250                 </fields>
1251                 <links>
1252                         <link field="usr" reltype="has_a" key="id" class="au"/>
1253                 </links>
1254         </class>
1255         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1256                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1257                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1258                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1259                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1260                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1261                 </fields>
1262                 <links>
1263                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1264                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1265                 </links>
1266         </class>
1267         <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">
1268                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1269                         <field name="field" reporter:datatype="link"/>
1270                         <field name="id" reporter:datatype="id" />
1271                         <field name="source" reporter:datatype="link"/>
1272                         <field name="value" reporter:datatype="text"/>
1273                 </fields>
1274                 <links>
1275                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1276                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1277                 </links>
1278         </class>
1279         <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">
1280                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1281                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1282                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1283                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1284                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1285                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1286                 </fields>
1287                 <links>
1288                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1289                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1290                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1291                 </links>
1292         </class>
1293         <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">
1294                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1295                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1296                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1297                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1298                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1299                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1300                 </fields>
1301                 <links>
1302                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1303                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1304                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1305                 </links>
1306         </class>
1307         <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">
1308                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1309                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1310                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1311                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1312                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1313                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1314                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1315                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1316                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1317                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1318                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1319                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1320                 </fields>
1321                 <links>
1322                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1323                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1324                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1325                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1326                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1327                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1328                 </links>
1329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1330             <actions>
1331                 <create permission="TRANSIT_COPY" context_field="owner">
1332                     <context link="target_copy" field="circ_lib"/>
1333                 </create>
1334                 <retrieve/>
1335                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1336                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1337             </actions>
1338         </permacrud>
1339         </class>
1340         <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">
1341                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1342                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1343                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1344                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1345                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1346                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1347                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1348                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1349                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1350                 </fields>
1351                 <links>
1352                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1353                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1354                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1355                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1356                 </links>
1357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1358             <actions>
1359                 <create permission="ADMIN_SURVEY">
1360                     <context link="survey" field="owner"/>
1361                 </create>
1362                 <retrieve/>
1363                 <update permission="ADMIN_SURVEY">
1364                     <context link="survey" field="owner"/>
1365                 </update>
1366                 <delete permission="ADMIN_SURVEY">
1367                     <context link="survey" field="owner"/>
1368                 </delete>
1369             </actions>
1370         </permacrud>
1371         </class>
1372         <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">
1373                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1374                         <field name="bucket" />
1375                         <field name="id" reporter:datatype="id" />
1376                         <field name="target_copy" reporter:datatype="link"/>
1377                         <field name="create_time" reporter:datatype="timestamp" />
1378                         <field name="pos" reporter:datatype="int" />
1379                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1380                 </fields>
1381                 <links>
1382                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1383                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1384             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1385                 </links>
1386         </class>
1387         <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">
1388                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1389                         <field name="id" reporter:datatype="id" />
1390                         <field name="item" reporter:datatype="link"/>
1391                         <field name="note" reporter:datatype="text" />
1392                 </fields>
1393                 <links>
1394                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1395                 </links>
1396         </class>
1397         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1399                         <field name="active" reporter:datatype="bool"/>
1400                         <field name="arn_source" />
1401                         <field name="arn_value" />
1402                         <field name="create_date" reporter:datatype="timestamp"/>
1403                         <field name="creator" />
1404                         <field name="deleted" reporter:datatype="bool"/>
1405                         <field name="edit_date" reporter:datatype="timestamp"/>
1406                         <field name="editor" />
1407                         <field name="id" reporter:datatype="id" />
1408                         <field name="last_xact_id" />
1409                         <field name="marc" />
1410                         <field name="source" />
1411                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1412                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1413                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1414                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1415                 </fields>
1416                 <links>
1417                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1418                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1419                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1420                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1421                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1422                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1423                 </links>
1424         </class>
1425         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1426                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1427                         <field name="char_encoding" />
1428                         <field name="id" />
1429                         <field name="record" />
1430                         <field name="record_status" />
1431                 </fields>
1432                 <links>
1433                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1434                 </links>
1435         </class>
1436         <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">
1437                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1438                         <field name="id" reporter:datatype="id" />
1439                         <field name="bib" reporter:datatype="link" />
1440                         <field name="authority" reporter:datatype="link" />
1441                 </fields>
1442                 <links>
1443                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1444                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1445                 </links>
1446         </class>
1447         <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">
1448                 <fields oils_persist:primary="code" oils_persist:sequence="">
1449                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1450                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1451                 </fields>
1452                 <links/>
1453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1454             <actions>
1455                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1456                 <retrieve/>
1457                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1458                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1459             </actions>
1460         </permacrud>
1461         </class>
1462         <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">
1463                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1464                         <field name="accepting_usr" />
1465                         <field name="amount" reporter:datatype="money" />
1466                         <field name="amount_collected" reporter:datatype="money" />
1467                         <field name="approval_code" reporter:datatype="text"/>
1468                         <field name="cash_drawer" reporter:datatype="link"/>
1469                         <field name="cc_first_name" reporter:datatype="text"/>
1470                         <field name="cc_last_name" reporter:datatype="text"/>
1471                         <field name="cc_number" reporter:datatype="text"/>
1472                         <field name="cc_type" reporter:datatype="text"/>
1473                         <field name="cc_processor" reporter:datatype="text"/>
1474                         <field name="expire_month" reporter:datatype="int" />
1475                         <field name="expire_year" reporter:datatype="int" />
1476                         <field name="id" reporter:datatype="id" />
1477                         <field name="note" reporter:datatype="text"/>
1478                         <field name="payment_ts" reporter:datatype="timestamp"/>
1479                         <field name="xact" reporter:datatype="link"/>
1480                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1481                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1482                 </fields>
1483                 <links>
1484                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1485                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1486                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1487                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1488                 </links>
1489         </class>
1490         <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">
1491                 <fields oils_persist:primary="name">
1492                         <field reporter:label="Field Class" name="field_class" />
1493                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1494                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1495                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1496                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1497                 </fields>
1498                 <links/>
1499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1500             <actions>
1501                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1502                 <retrieve/>
1503                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1504                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1505             </actions>
1506         </permacrud>
1507         </class>
1508
1509         <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">
1510                 <fields oils_persist:primary="alias">
1511                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1512                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1513                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1514                 </fields>
1515                 <links>
1516                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1517                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1518                 </links>
1519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1520             <actions>
1521                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1522                 <retrieve/>
1523                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1524                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1525             </actions>
1526         </permacrud>
1527         </class>
1528
1529         <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">
1530                 <fields oils_persist:primary="name">
1531                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1532                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1533                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1534                 </fields>
1535                 <links>
1536                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1537                 </links>
1538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1539             <actions>
1540                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1541                 <retrieve/>
1542                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1543                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1544             </actions>
1545         </permacrud>
1546         </class>
1547
1548         <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">
1549                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1550                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1551                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1552                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1553                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1554                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1555                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1556                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1557                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1558                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1559                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1560                 </fields>
1561                 <links>
1562                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1563                 </links>
1564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1565             <actions>
1566                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1567                 <retrieve/>
1568                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1569                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1570             </actions>
1571         </permacrud>
1572         </class>
1573         <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">
1574                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1575                         <field name="id" reporter:datatype="id" />
1576                         <field name="name" reporter:datatype="text"/>
1577                         <field name="xpath" reporter:datatype="text"/>
1578                         <field name="format" reporter:datatype="link"/>
1579                         <field name="first_word" reporter:datatype="bool" />
1580                 </fields>
1581                 <links/>
1582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1583             <actions>
1584                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1585                 <retrieve/>
1586                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1587                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1588             </actions>
1589         </permacrud>
1590         </class>
1591         <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">
1592                 <fields oils_persist:primary="code" oils_persist:sequence="">
1593                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1594                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1595                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1596                 </fields>
1597                 <links/>
1598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1599             <actions>
1600                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1601                 <retrieve/>
1602                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1603                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1604             </actions>
1605         </permacrud>
1606         </class>
1607         <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">
1608                 <fields oils_persist:primary="code" oils_persist:sequence="">
1609                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1610                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1611                 </fields>
1612                 <links/>
1613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1614             <actions>
1615                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1616                 <retrieve/>
1617                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1618                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1619             </actions>
1620         </permacrud>
1621         </class>
1622         <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">
1623                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1624                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1625                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1626                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1627                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1628                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1629                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1630                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1631                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1632                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1633                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1634                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1635                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1636                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1637                 </fields>
1638                 <links>
1639                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1640                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1641                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1642                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1643                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1644                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1645                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1646                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1647                 </links>
1648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1649             <actions>
1650                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1651                 <retrieve/>
1652                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1653                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1654             </actions>
1655         </permacrud>
1656         </class>
1657         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1658                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1659                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1660                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1661                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1662                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1663                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1664                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1665                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1666                 </fields>
1667                 <links>
1668                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1669                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1670         </links>
1671         </class>
1672         <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">
1673                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1674                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1675                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1676                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1677                 </fields>
1678                 <links>
1679                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1680                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1681                 </links>
1682         </class>
1683         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1684                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1685                         <field name="id" reporter:datatype="id" />
1686                         <field name="value" oils_persist:i18n="true" />
1687                 </fields>
1688                 <links/>
1689         </class>
1690         <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">
1691                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1692                         <field name="balance_owed" reporter:datatype="money" />
1693                         <field name="total_owed" reporter:datatype="money" />
1694                         <field name="total_paid" reporter:datatype="money" />
1695                         <field name="usr" reporter:datatype="link"/>
1696                 </fields>
1697                 <links>
1698                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1699         </links>
1700         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1701             <actions>
1702                 <retrieve permission="VIEW_USER">
1703                     <context link="usr" field="home_ou"/>
1704                 </retrieve>
1705             </actions>
1706         </permacrud>
1707         </class>
1708         <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">
1709                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1710                         <field name="collector" />
1711                         <field name="enter_time" reporter:datatype="timestamp"/>
1712                         <field name="id" reporter:datatype="id" />
1713                         <field name="location" reporter:datatype="link"/>
1714                         <field name="usr" reporter:datatype="link"/>
1715                 </fields>
1716                 <links>
1717                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1718                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1719                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1720                 </links>
1721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1722             <actions>
1723                 <create permission="money.collections_tracker.create" context_field="location"/>
1724                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1725                 <delete permission="money.collections_tracker.create" context_field="location"/>
1726             </actions>
1727         </permacrud>
1728         </class>
1729         <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">
1730                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1731                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1732                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1733                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1734                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1735                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1736                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1737                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1738                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1739                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1740                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1741                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1742                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1743                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1744                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1745                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1746                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1747                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1748                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1749                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1750                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1751                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1752                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1753                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1754                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1755                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1756                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1757                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1758                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1759                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1760                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
1761                 </fields>
1762                 <links>
1763                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1764                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1765                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1766                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1767                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1768                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1769                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1770                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1771                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1772                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1773                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1774                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
1775                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1776                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1777                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1778                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1779                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
1780                 </links>
1781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1782             <actions>
1783                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1784                 <retrieve/>
1785                 <update permission="UPDATE_MARC" global_required="true"/>
1786             </actions>
1787         </permacrud>
1788         </class>
1789         <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">
1790                 <fields oils_persist:primary="id">
1791                         <field name="dow_0_close" />
1792                         <field name="dow_0_open" />
1793                         <field name="dow_1_close" />
1794                         <field name="dow_1_open" />
1795                         <field name="dow_2_close" />
1796                         <field name="dow_2_open" />
1797                         <field name="dow_3_close" />
1798                         <field name="dow_3_open" />
1799                         <field name="dow_4_close" />
1800                         <field name="dow_4_open" />
1801                         <field name="dow_5_close" />
1802                         <field name="dow_5_open" />
1803                         <field name="dow_6_close" />
1804                         <field name="dow_6_open" />
1805                         <field name="id" reporter:datatype="id" />
1806                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1807                 </fields>
1808                 <links>
1809                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1810                 </links>
1811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1812             <actions>
1813                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1814                 <retrieve/>
1815                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1816                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1817             </actions>
1818         </permacrud>
1819         </class>
1820         <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">
1821                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1822                         <field name="close_end" reporter:datatype="timestamp" />
1823                         <field name="close_start" reporter:datatype="timestamp" />
1824                         <field name="id" reporter:datatype="id" />
1825                         <field name="org_unit" reporter:datatype="org_unit"/>
1826                         <field name="reason" reporter:datatype="text"/>
1827                 </fields>
1828                 <links>
1829                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1830                 </links>
1831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1832             <actions>
1833                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1834                 <retrieve/>
1835                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1836                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1837             </actions>
1838         </permacrud>
1839         </class>
1840         <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">
1841                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1842                         <field name="extended" reporter:datatype="interval"/>
1843                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1844                         <field name="max_renewals" reporter:datatype="int" />
1845                         <field name="name" reporter:datatype="text"/>
1846                         <field name="normal" reporter:datatype="interval"/>
1847                         <field name="shrt" reporter:datatype="interval"/>
1848                 </fields>
1849                 <links>
1850                 </links>
1851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1852             <actions>
1853                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1854                 <retrieve/>
1855                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1856                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1857             </actions>
1858         </permacrud>
1859         </class>
1860         <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">
1861                 <fields oils_persist:primary="id" oils_persist:sequence="">
1862                         <field name="balance_owed" reporter:datatype="money"/>
1863                         <field name="id" reporter:datatype="id" />
1864                         <field name="last_billing_note" reporter:datatype="text"/>
1865                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1866                         <field name="last_billing_type" reporter:datatype="text"/>
1867                         <field name="last_payment_note" reporter:datatype="text"/>
1868                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1869                         <field name="last_payment_type" reporter:datatype="text"/>
1870                         <field name="total_owed" reporter:datatype="money"/>
1871                         <field name="total_paid" reporter:datatype="money"/>
1872                         <field name="usr" reporter:datatype="link"/>
1873                         <field name="xact_finish" reporter:datatype="timestamp" />
1874                         <field name="xact_start" reporter:datatype="timestamp" />
1875                         <field name="xact_type" reporter:datatype="text"/>
1876                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1877                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1878                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1879                         <field name="billing_location" reporter:datatype="link"/>
1880                 </fields>
1881                 <links>
1882                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1883                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1884                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1885                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1886                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1887                 </links>
1888         </class>
1889         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1890                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1891                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1892                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1893                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1894                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1895                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1896                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1897                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1898                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1899                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1900                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1901                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1902                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1903                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1904                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1905                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1906                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1907                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1908                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1909                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1910                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1911                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1912                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1913                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1914                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1915                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1916                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1917                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1918                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1919                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1920                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1921                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1922                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1923                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1924                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1925                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1926                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1927                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1928                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1929                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1930                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1931                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1932                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1933                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1934                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1935                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1936                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1937                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1938                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1939                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1940                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1941                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1942                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1943                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1944                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1945                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1946                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1947                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1948                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1949                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1950                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1951                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1952                 </fields>
1953                 <links>
1954                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1955                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1956                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1957                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1958                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1959                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1960                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1961                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1962                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1963                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1964                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1965                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1966                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1967                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1968                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1969                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1970                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1971                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1972                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1973                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1974                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1975                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1976                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1977                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1978                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1979                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1980                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1981                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1982                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1983                 </links>
1984         </class>
1985
1986         <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">
1987                 <fields oils_persist:primary="name">
1988                         <field name="name" reporter:datatype="text"/>
1989                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1990                 </fields>
1991                 <links/>
1992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1993                         <actions>
1994                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1995                                 <retrieve/>
1996                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1997                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
1998                         </actions>
1999                 </permacrud>
2000         </class>
2001         <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">
2002                 <fields oils_persist:primary="name">
2003                         <field name="name" reporter:datatype="text"/>
2004                         <field name="label" reporter:datatype="text"/>
2005                         <field name="description" reporter:datatype="text"/>
2006                         <field name="datatype" reporter:datatype="text"/>
2007                         <field name="fm_class" reporter:datatype="text"/>
2008                         <field name="grp" reporter:datatype="link"/>
2009                 </fields>
2010                 <links>
2011                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2012                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2013                 </links>
2014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2015                         <actions>
2016                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2017                                 <retrieve/>
2018                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2019                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2020                         </actions>
2021                 </permacrud>
2022         </class>
2023         <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">
2024                 <fields oils_persist:primary="name">
2025                         <field name="name" reporter:datatype="text"/>
2026                         <field name="label" reporter:datatype="text"/>
2027                         <field name="description" reporter:datatype="text"/>
2028                         <field name="datatype" reporter:datatype="text"/>
2029                         <field name="view_perm" reporter:datatype="link"/>
2030                         <field name="update_perm" reporter:datatype="link"/>
2031                         <field name="fm_class" reporter:datatype="text"/>
2032                         <field name="grp" reporter:datatype="link"/>
2033                 </fields>
2034                 <links>
2035                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2036                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2037                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2038                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2039                 </links>
2040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2041                         <actions>
2042                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2043                                 <retrieve/>
2044                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2045                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2046                         </actions>
2047                 </permacrud>
2048         </class>
2049         <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">
2050                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2051                         <field name="id" />
2052                         <field name="name"  reporter:datatype="text"/>
2053                         <field name="org_unit" reporter:datatype="org_unit"/>
2054                         <field name="value"  reporter:datatype="text"/>
2055                 </fields>
2056                 <links>
2057                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2058                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2059                 </links>
2060         </class>
2061         <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">
2062                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2063                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2064                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2065                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2066                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2067                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2068                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2069                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2070                 </fields>
2071                 <links>
2072                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2073                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2074                 </links>
2075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2076             <actions>
2077                 <create permission="CREATE_COPY_NOTE">
2078                     <context link="owning_copy" field="circ_lib"/>
2079                 </create>
2080                 <retrieve permission="VIEW_COPY_NOTES">
2081                     <context link="owning_copy" field="circ_lib"/>
2082                 </retrieve>
2083                 <update permission="UPDATE_COPY_NOTE">
2084                     <context link="owning_copy" field="circ_lib"/>
2085                 </update>
2086                 <delete permission="DELETE_COPY_NOTE">
2087                     <context link="owning_copy" field="circ_lib"/>
2088                 </delete>
2089             </actions>
2090         </permacrud>
2091         </class>
2092         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2093                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2094                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2095                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2096                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2097                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2098                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2099                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2100                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2101                 </fields>
2102                 <links>
2103                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2104                 </links>
2105         </class>
2106         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2107                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2108                         <field name="fingerprint"  reporter:datatype="text"/>
2109                         <field name="id" reporter:datatype="id" />
2110                         <field name="master_record" reporter:datatype="link"/>
2111                         <field name="mods"  reporter:datatype="text"/>
2112                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2113                 </fields>
2114                 <links>
2115                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2116                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2117                 </links>
2118         </class>
2119         <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">
2120                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2121                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2122                         <field name="name"  reporter:datatype="text"/>
2123                 </fields>
2124                 <links/>
2125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2126             <actions>
2127                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2128                 <retrieve/>
2129                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2130                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2131             </actions>
2132         </permacrud>
2133         </class>
2134         <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">
2135                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2136                         <field name="code"  reporter:datatype="text"/>
2137                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2138                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2139                 </fields>
2140                 <links/>
2141         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2142             <actions>
2143                 <create permission="CREATE_PERM" global_required="true"/>
2144                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2145                 <update permission="UPDATE_PERM" global_required="true"/>
2146                 <delete permission="DELETE_PERM" global_required="true"/>
2147             </actions>
2148         </permacrud>
2149         </class>
2150         <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">
2151                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2152                         <field name="id" reporter:datatype="id" />
2153                         <field name="metarecord" reporter:datatype="link"/>
2154                         <field name="source" reporter:datatype="link"/>
2155                 </fields>
2156                 <links>
2157                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2158                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2159                 </links>
2160         </class>
2161         <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">
2162                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2163                         <field name="id" reporter:datatype="id" />
2164                         <field name="field" reporter:datatype="link"/>
2165                         <field name="source" reporter:datatype="link"/>
2166                         <field name="value"  reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2170                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2171                 </links>
2172         </class>
2173         <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">
2174                 <oils_persist:source_definition>
2175                         SELECT * FROM metabib.author_field_entry
2176                                                 UNION ALL
2177                         SELECT * FROM metabib.keyword_field_entry
2178                                                 UNION ALL
2179                         SELECT * FROM metabib.identifier_field_entry
2180                                                 UNION ALL
2181                         SELECT * FROM metabib.title_field_entry
2182                                                 UNION ALL
2183                         SELECT * FROM metabib.subject_field_entry
2184                                                 UNION ALL
2185                         SELECT * FROM metabib.series_field_entry
2186                 </oils_persist:source_definition>
2187                 <fields>
2188                         <field name="field" reporter:datatype="link"/>
2189                         <field name="id" reporter:datatype="id" />
2190                         <field name="source" reporter:datatype="link"/>
2191                         <field name="value"  reporter:datatype="text"/>
2192                 </fields>
2193                 <links>
2194                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2195                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2196                 </links>
2197         </class>
2198         <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">
2199                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2200                         <field name="field" reporter:datatype="link"/>
2201                         <field name="id" reporter:datatype="id" />
2202                         <field name="source" reporter:datatype="link"/>
2203                         <field name="value"  reporter:datatype="text"/>
2204                 </fields>
2205                 <links>
2206                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2207                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2208                 </links>
2209         </class>
2210         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2211                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2212                         <field name="accepting_usr" reporter:datatype="link"/>
2213                         <field name="amount" reporter:datatype="money" />
2214                         <field name="amount_collected" reporter:datatype="money" />
2215                         <field name="cash_drawer" reporter:datatype="link"/>
2216                         <field name="id" reporter:datatype="id" />
2217                         <field name="note"  reporter:datatype="text"/>
2218                         <field name="payment_ts" reporter:datatype="timestamp"/>
2219                         <field name="xact" reporter:datatype="link"/>
2220                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2221                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2222                 </fields>
2223                 <links>
2224                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2225                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2226                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2227                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2228                 </links>
2229         </class>
2230         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2231                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2232                         <field name="accepting_usr" reporter:datatype="link"/>
2233                         <field name="amount" reporter:datatype="money" />
2234                         <field name="amount_collected" reporter:datatype="money" />
2235                         <field name="id" reporter:datatype="id" />
2236                         <field name="note"  reporter:datatype="text"/>
2237                         <field name="payment_ts" reporter:datatype="timestamp"/>
2238                         <field name="xact" reporter:datatype="link"/>
2239                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2240                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2241                 </fields>
2242                 <links>
2243                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2244                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2245                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2246                 </links>
2247         </class>
2248         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2249                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2250                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2251                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2252                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2253                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2254                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2255                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2256                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2257                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2258                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2259                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2260                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2261                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2262                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2263                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2264                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2265                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2266                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2267                 </fields>
2268                 <links>
2269                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2270                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2271                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2272                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2273                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2274                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2275                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2276                 </links>
2277         </class>
2278
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2281                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2282                         <field name="name"  reporter:datatype="text"/>
2283                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2284                         <field name="block_list" reporter:datatype="text"/>
2285                         <field name="org_depth" reporter:datatype="int"/>
2286                 </fields>
2287                 <links/>
2288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2289             <actions>
2290                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2291                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2292                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2293                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2294             </actions>
2295         </permacrud>
2296         </class>
2297         <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">
2298                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2299                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2300                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2301                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2302                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2303                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2304                 </fields>
2305                 <links>
2306                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2307                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2308                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2309         </links>
2310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2311             <actions>
2312                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2313                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2314                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2315                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2316             </actions>
2317         </permacrud>
2318         </class>
2319         <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">
2320                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2321                         <field name="holdable" reporter:datatype="bool"/>
2322                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2323                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2324                         <field name="opac_visible" reporter:datatype="bool"/>
2325                 </fields>
2326                 <links/>
2327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2328             <actions>
2329                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2330                 <retrieve/>
2331                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2332                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2333             </actions>
2334         </permacrud>
2335         </class>
2336         <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">
2337                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2338                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2339                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2340                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2341                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2342                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2343                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2344                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2345                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2346                 </fields>
2347                 <links>
2348                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2349                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2350                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2351                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2352                 </links>
2353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2354                         <actions>
2355                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2356                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2357                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2358                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2359                         </actions>
2360                 </permacrud>
2361         </class>
2362         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2363                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2364                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2365                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2366                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2367                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2368                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2369                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2370                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2371                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2372                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2373                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2374                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2375                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2376                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2377                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2378                 </fields>
2379                 <links>
2380                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2381                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2382                 </links>
2383         </class>
2384         <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">
2385                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2386                         <field name="call_number" />
2387                         <field name="create_date" reporter:datatype="timestamp"/>
2388                         <field name="creator" reporter:datatype="link"/>
2389                         <field name="id" reporter:datatype="id" />
2390                         <field name="pub" reporter:datatype="bool"/>
2391                         <field name="title"  reporter:datatype="text"/>
2392                         <field name="value"  reporter:datatype="text"/>
2393                 </fields>
2394                 <links>
2395                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2396                 </links>
2397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2398             <actions>
2399                 <create permission="CREATE_VOLUME_NOTE">
2400                     <context link="call_number" field="owning_lib"/>
2401                 </create>
2402                 <retrieve permission="VIEW_VOLUME_NOTES">
2403                     <context link="call_number" field="owning_lib"/>
2404                 </retrieve>
2405                 <update permission="UPDATE_VOLUME_NOTE">
2406                     <context link="call_number" field="owning_lib"/>
2407                 </update>
2408                 <delete permission="DELETE_VOLUME_NOTE">
2409                     <context link="call_number" field="owning_lib"/>
2410                 </delete>
2411             </actions>
2412         </permacrud>
2413         </class>
2414         <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">
2415                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2416                         <field name="create_date" reporter:datatype="timestamp"/>
2417                         <field name="creator" reporter:datatype="link"/>
2418                         <field name="edit_date" reporter:datatype="timestamp"/>
2419                         <field name="editor" reporter:datatype="link"/>
2420                         <field name="id" reporter:datatype="id" />
2421                         <field name="record" reporter:datatype="link"/>
2422                         <field name="value" reporter:datatype="text"/>
2423                 </fields>
2424                 <links>
2425                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2426                 </links>
2427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2428             <actions>
2429                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2430                 <retrieve/>
2431                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2432                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2433             </actions>
2434         </permacrud>
2435         </class>
2436         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2437                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2438                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2439                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2440                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2441                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2442                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2443                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2444                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2445                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2446                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2447                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2448                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2449                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2450                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2451                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2452                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2453                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2454                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2455                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2456                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2457                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2458                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2459                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2460                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2461                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2462                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2463                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2464                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2465                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2466                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2467                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2468                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2469                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2470                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2471                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2472                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2473                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2474                 </fields>
2475                 <links>
2476                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2477                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2478                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2479                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2480                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2481                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2482                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2483                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2484                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2485                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2486                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2487                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2488                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2489                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2490                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2491                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2492                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2493                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2494                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2495                 </links>
2496         </class>
2497         <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">
2498                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2499                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2500                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2501                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2502                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2503                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2504                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2505                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2506                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2507                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2508                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2509                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2510                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2511                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2512                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2513                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2514                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2515                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2516                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2517                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2518                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2519                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2520                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2521                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2522                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2523                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2524                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2525                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2526                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2527                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2528                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2529                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2530                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2531                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2532                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2533                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2534                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2535                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2536                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2537                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2541                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2542                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2543                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2544                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2545                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2546                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2547                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2548                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2549                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2550                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2551                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2552                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2553                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2554                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2555                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2556                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2557                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2558                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2559                 </links>
2560         </class>
2561         <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">
2562                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2563                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2564                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2565                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2566                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2567                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2568                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2569                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2570                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2571                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2572                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2573                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2574                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2575                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2576                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2577                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2578                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2579                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2580                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2581                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2582                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2583                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2584                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2585                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2586                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2587                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2588                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2589                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2590                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2591                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2592                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2593                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2594                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2595                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2596                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2597                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2598                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2599                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2600                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2601                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2602                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2603                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2604                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2605                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2606                 </fields>
2607                 <links>
2608                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2609                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2610                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2611                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2612                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2613                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2614                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2615                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2616                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2617                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2618                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2619                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2620                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2621                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2622                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2623                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2624                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2625                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2626                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2627                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2628                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2629                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2630                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2631                 </links>
2632         </class>
2633
2634         <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">
2635                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2636                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2637                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2638                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2639                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2640                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2641                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2642                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2643                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2644                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2645                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2646                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2647                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2648                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2649                 </fields>
2650                 <links>
2651                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2652                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2653                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2654                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2655                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2656                 </links>
2657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2658                         <actions>
2659                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2660                                 <retrieve />
2661                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2662                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2663                         </actions>
2664                 </permacrud>
2665         </class>
2666
2667         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2668                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2669                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
2670                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2671                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2672                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2673                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2674                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2675                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2676                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2677                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2678                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2679                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2680                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2681                 </fields>
2682                 <links>
2683                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2684                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2685                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2686                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2687                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2688                 </links>
2689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2690                         <actions>
2691                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2692                                 <retrieve />
2693                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2694                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2695                         </actions>
2696                 </permacrud>
2697         </class>
2698         
2699         <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">
2700                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2701                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
2702                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2703                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2704                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2705                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2706                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2707                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2708                 </fields>
2709                 <links>
2710                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2711                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2712                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2713                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2714                 </links>
2715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2716                         <actions>
2717                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2718                                 <retrieve />
2719                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2720                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2721                         </actions>
2722                 </permacrud>
2723         </class>
2724         
2725         <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">
2726                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2727                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
2728                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2729                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2730                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2731                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2732                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2733                 </fields>
2734                 <links>
2735                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2736                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2737                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2738                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2739                 </links>
2740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2741                         <actions>
2742                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2743                                 <retrieve />
2744                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2745                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2746                         </actions>
2747                 </permacrud>
2748         </class>
2749         
2750         <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">
2751                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2752                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2753                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2754                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2755                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2756                 </fields>
2757                 <links>
2758                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2759                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2760                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2761                 </links>
2762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2763                         <actions>
2764                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2765                                 <retrieve />
2766                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2767                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2768                         </actions>
2769                 </permacrud>
2770         </class>
2771         
2772         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2773                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2774                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2775                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2776                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2777                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2778                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2779                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2780                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2781                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2782                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2783                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2784                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2785                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2786                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2787                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2788                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2789                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2790                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2791                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2792                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2793                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2794                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2795                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2796                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2797                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2798                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2799                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2800                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2801                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2802                 </fields>
2803                 <links>
2804                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2805                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2806                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2807                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2808                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2809                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2810                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2811                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2812                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2813                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2814                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2815                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2816                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2817                 </links>
2818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2819                         <actions>
2820                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2821                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2822                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2823                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2824                         </actions>
2825                 </permacrud>
2826         </class>
2827         
2828         <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">
2829                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2830                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2831                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2832                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2833                 </fields>
2834                 <links>
2835                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2836                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2837                 </links>
2838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2839                         <actions>
2840                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2841                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
2842                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2843                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2844                         </actions>
2845                 </permacrud>
2846         </class>
2847
2848         <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">
2849                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2850                         <field name="bucket" reporter:datatype="link"/>
2851                         <field name="id" reporter:datatype="id" />
2852                         <field name="target_call_number" reporter:datatype="link" />
2853                         <field name="create_time" reporter:datatype="timestamp" />
2854                         <field name="pos" reporter:datatype="int" />
2855                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2856                 </fields>
2857                 <links>
2858                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2859                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2860             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2861                 </links>
2862         </class>
2863         <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">
2864                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2865                         <field name="id" reporter:datatype="id" />
2866                         <field name="item" reporter:datatype="link"/>
2867                         <field name="note" reporter:datatype="text" />
2868                 </fields>
2869                 <links>
2870                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2871                 </links>
2872         </class>
2873         <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">
2874                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2875                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2876                         <field name="btype" reporter:datatype="text"/>
2877                         <field name="id" reporter:datatype="id" />
2878                         <field name="name" reporter:datatype="text"/>
2879                         <field name="owner" reporter:datatype="link"/>
2880                         <field name="pub" reporter:datatype="bool"/>
2881                         <field name="create_time" reporter:datatype="timestamp" />
2882                 </fields>
2883                 <links>
2884                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2885                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2886                 </links>
2887         </class>
2888         <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">
2889                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2890                         <field name="id" reporter:datatype="id" />
2891                         <field name="bucket" reporter:datatype="link"/>
2892                         <field name="note" reporter:datatype="text" />
2893                 </fields>
2894                 <links>
2895                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2896                 </links>
2897         </class>
2898         <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">
2899                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2900                         <field name="hold" reporter:datatype="link"/>
2901                         <field name="id" reporter:datatype="id" />
2902                         <field name="target_copy" reporter:datatype="link"/>
2903                 </fields>
2904                 <links>
2905                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2906                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2907                 </links>
2908         </class>
2909         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2911                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2912                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2913                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2914                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2915                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2916                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2917                 </fields>
2918                 <links>
2919                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2920                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2921                 </links>
2922         </class>
2923         <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">
2924                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2925                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2926                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2927                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2928                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2929                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2930                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2931                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2932                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2933                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2934                 </fields>
2935                 <links>
2936                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2937                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2938                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2939                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
2940                 </links>
2941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2942             <actions>
2943                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2944                 <retrieve/>
2945                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2946                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2947             </actions>
2948         </permacrud>
2949         </class>
2950
2951     <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">
2952         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2953             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2954             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2955             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2956             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2957         </fields>
2958         <links>
2959             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2960             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2961         </links>
2962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2963             <actions>
2964                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2965                 <retrieve/>
2966                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2967                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2968             </actions>
2969         </permacrud>
2970     </class>
2971
2972         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2973                 <fields>
2974                         <field name="id" oils_persist:virtual="true" />
2975                         <field name="location" oils_persist:virtual="true" />
2976                         <field name="owning_lib" oils_persist:virtual="true" />
2977                         <field name="holdings" oils_persist:virtual="true" />
2978                         <field name="current_holdings" oils_persist:virtual="true" />
2979                         <field name="supplements" oils_persist:virtual="true" />
2980                         <field name="current_supplements" oils_persist:virtual="true" />
2981                         <field name="indexes" oils_persist:virtual="true" />
2982                         <field name="current_indexes" oils_persist:virtual="true" />
2983                         <field name="online" oils_persist:virtual="true" />
2984                         <field name="missing" oils_persist:virtual="true" />
2985                         <field name="incomplete" oils_persist:virtual="true" />
2986                 </fields>
2987         </class>
2988         <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">
2989                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2990                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2991                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2992                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2993                         <field reporter:label="Creator" name="creator" />
2994                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2995                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2996                         <field reporter:label="Editor" name="editor" />
2997                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2998                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2999                         <field reporter:label="MARC" name="marc" />
3000                         <field reporter:label="Source" name="source" />
3001                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3002                 </fields>
3003                 <links>
3004                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3005                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3006                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3007                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3008                 </links>
3009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010                         <actions>
3011                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3012                                 <retrieve/>
3013                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3014                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3015                         </actions>
3016                 </permacrud>
3017         </class>
3018
3019         <class id="sercap" 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">
3020                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3021                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3022                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3023                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3024                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
3025                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3026                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3027                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3028                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3029                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3030                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3031                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3032                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3033                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3034                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3035                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3036                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3037                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3038                 </fields>
3039                 <links>
3040                         <link field="record" reltype="has_a" key="id" map="" class="ssub"/>
3041                 </links>
3042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3043                 </permacrud>
3044         </class>
3045
3046         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3047                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3048                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
3049                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
3050                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3051                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3052                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3053                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3054                         <field reporter:label="Captions and Patterns" name="captions_and_patterns" oils_persist:virtual="true" reporter:datatype="link"/>
3055                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3056                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3057                 </fields>
3058                 <links>
3059                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3060                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3061                         <link field="captions_and_patterns" reltype="has_many" key="id" map="" class="sercap"/>
3062                         <link field="distributions" reltype="has_many" key="id" map="" class="sdist"/>
3063                         <link field="issuances" reltype="has_many" key="id" map="" class="siss"/>
3064                 </links>
3065         </class>
3066
3067         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3068                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3069                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3070                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3071                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3072                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="link"/>
3073                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3074                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3075                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3076                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3077                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3078                         <field reporter:label="Unit Label Base" name="unit_label_base" reporter:datatype="text"/>
3079                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3080                         <field reporter:label="Bib Summaries" name="bib_summaries" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Suplemental Summaries" name="sup_summaries" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Index Summaries" name="index_summaries" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3084                 </fields>
3085                 <links>
3086                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3087                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3088                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3089                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3090                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3091                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3092                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3093                         <link field="bib_summaries" reltype="has_many" key="id" map="" class="sbsum"/>
3094                         <link field="sup_summaries" reltype="has_many" key="id" map="" class="sssum"/>
3095                         <link field="index_summaries" reltype="has_many" key="id" map="" class="sisum"/>
3096                         <link field="streams" reltype="has_many" key="id" map="" class="sstr"/>
3097                 </links>
3098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099                 </permacrud>
3100         </class>
3101
3102         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3103                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3104                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3105                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3106                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3107                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3108                 </fields>
3109                 <links>
3110                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3111                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3112                 </links>
3113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3114                 </permacrud>
3115         </class>
3116
3117         <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">
3118                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3119                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3120                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3121                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3122                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3123                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3124                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3125                 </fields>
3126                 <links>
3127                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3128                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3129                 </links>
3130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3131                 </permacrud>
3132         </class>
3133
3134         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3135                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3136                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3137                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3138                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3139                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3140                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3141                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3142                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3143                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3144                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3145                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3146                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3147                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3148                 </fields>
3149                 <links>
3150                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3151                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3152                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3153                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3154                 </links>
3155         </class>
3156
3157         <class id="sunit" controller="open-ils.cstore" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3158                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3159                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3160             <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3161             <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3162             <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3163             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3164             <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3165             <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3166             <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3167             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3168             <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3169             <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3170             <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3171             <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3172             <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3173             <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3174             <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3175             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3176             <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3177             <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3178             <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3179             <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3180             <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3181             <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3182             <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3183             <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3184             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3185             <field reporter:label="Price" name="price" reporter:datatype="money" />
3186             <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3187             <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3188             <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3189             <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3190             <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3191             <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3192             <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3193             <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3194             <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3195             <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field reporter:label="Label Sort Key" name="label_sort_key" reporter:datatype="text"/>
3197                         <field reporter:label="Contents" name="contents" reporter:datatype="text"/>
3198                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3199                         <field reporter:label="Serial Items" name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3200                 </fields>
3201                 <links>
3202             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3203             <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3204             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3205             <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3206             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3207             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3208             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3209             <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3210             <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3211             <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3212             <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3213             <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3214             <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3215             <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3216             <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3217                 </links>
3218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3219                 </permacrud>
3220         </class>
3221
3222         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3223                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3224                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3225                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3226                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3227                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3228                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3229                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3230                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3231                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3232                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3233                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3234                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3235                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3236                 </fields>
3237                 <links>
3238                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3239                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3240                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3241                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3242                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3243                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3244                         <link field="notes" reltype="has_many" key="id" map="" class="sin"/>
3245                 </links>
3246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3247                 </permacrud>
3248         </class>
3249
3250         <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">
3251                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3252                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3253                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3254                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3255                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3256                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3257                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3258                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3259                 </fields>
3260                 <links>
3261                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3262                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3263                 </links>
3264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3265                 </permacrud>
3266         </class>
3267
3268         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
3269                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
3270                         <field name="id" reporter:datatype="id" />
3271                         <field name="distribution" reporter:datatype="link"/>
3272                         <field name="generated_coverage" reporter:datatype="text"/>
3273                         <field name="textual_holdings" reporter:datatype="text"/>
3274                 </fields>
3275                 <links>
3276                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3277                 </links>
3278         </class>
3279
3280         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
3281                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
3282                         <field name="id" reporter:datatype="id" />
3283                         <field name="distribution" reporter:datatype="link"/>
3284                         <field name="generated_coverage" reporter:datatype="text"/>
3285                         <field name="textual_holdings" reporter:datatype="text"/>
3286                 </fields>
3287                 <links>
3288                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3289                 </links>
3290         </class>
3291
3292         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
3293                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3294                         <field name="id" reporter:datatype="id" />
3295                         <field name="distribution" reporter:datatype="link"/>
3296                         <field name="generated_coverage" reporter:datatype="text"/>
3297                         <field name="textual_holdings" reporter:datatype="text"/>
3298                 </fields>
3299                 <links>
3300                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3301                 </links>
3302         </class>
3303
3304         <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">
3305                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3306                         <field name="id" reporter:datatype="id" />
3307                         <field name="owning_copy" reporter:datatype="link"/>
3308                         <field name="stat_cat" reporter:datatype="link"/>
3309                         <field name="stat_cat_entry" reporter:datatype="link"/>
3310                 </fields>
3311                 <links>
3312                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3313                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3314                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3315                 </links>
3316         </class>
3317         <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">
3318                 <fields oils_persist:primary="code">
3319                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3320                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3321                 </fields>
3322                 <links/>
3323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3324             <actions>
3325                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3326                 <retrieve/>
3327                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3328                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3329             </actions>
3330         </permacrud>
3331         </class>
3332         <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">
3333                 <fields oils_persist:primary="code">
3334                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3335                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3336                 </fields>
3337                 <links/>
3338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3339             <actions>
3340                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3341                 <retrieve/>
3342                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3343                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3344             </actions>
3345         </permacrud>
3346         </class>
3347         <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">
3348                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3349                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3350                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3351                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3352                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3353                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3354                 </fields>
3355                 <links>
3356             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3357         </links>
3358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3359             <actions>
3360                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3361                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3362                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3363                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3364             </actions>
3365         </permacrud>
3366         </class>
3367         <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">
3368                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3369                         <field name="id" reporter:datatype="id" />
3370                         <field name="name" reporter:datatype="text"/>
3371                 </fields>
3372                 <links/>
3373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3374             <actions>
3375                 <create permission="CREATE_LASSO" global_required="true"/>
3376                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3377                 <update permission="UPDATE_LASSO" global_required="true"/>
3378                 <delete permission="DELETE_LASSO" global_required="true"/>
3379             </actions>
3380         </permacrud>
3381         </class>
3382         <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">
3383                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3384                         <field name="id" reporter:datatype="id" />
3385                         <field name="lasso" reporter:datatype="link"/>
3386                         <field name="org_unit" reporter:datatype="org_unit"/>
3387                 </fields>
3388                 <links>
3389                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3390                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3391                 </links>
3392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3393             <actions>
3394                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3395                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3396                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3397                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3398             </actions>
3399         </permacrud>
3400         </class>
3401         <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">
3402                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3403                         <field name="id" reporter:datatype="id" />
3404                         <field name="from_org" reporter:datatype="org_unit"/>
3405                         <field name="to_org" reporter:datatype="org_unit"/>
3406                         <field name="prox" reporter:datatype="int" />
3407                 </fields>
3408                 <links>
3409                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3410                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3411                 </links>
3412         </class>
3413         <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">
3414                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3415                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3416                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3417                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3418                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3419                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3420                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3421                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3422                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3423                 </fields>
3424                 <links/>
3425         </class>
3426         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3427                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3428                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3429                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3430                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3431                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3432                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3433                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3434                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3435                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3436                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3437                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3438                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3439                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3440                 </fields>
3441                 <links>
3442                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3443                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3444                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3445                 </links>
3446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3447             <actions>
3448                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3449                 <retrieve/>
3450                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3451                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3452             </actions>
3453         </permacrud>
3454         </class>
3455         <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">
3456                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3457                         <field name="address_type"  reporter:datatype="text"/>
3458                         <field name="city"  reporter:datatype="text"/>
3459                         <field name="country"  reporter:datatype="text"/>
3460                         <field name="county"  reporter:datatype="text"/>
3461                         <field name="id" reporter:datatype="id" />
3462                         <field name="org_unit" reporter:datatype="org_unit"/>
3463                         <field name="post_code"  reporter:datatype="text"/>
3464                         <field name="state"  reporter:datatype="text"/>
3465                         <field name="street1"  reporter:datatype="text"/>
3466                         <field name="street2"  reporter:datatype="text"/>
3467                         <field name="valid" reporter:datatype="bool"/>
3468                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3469                 </fields>
3470                 <links>
3471                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3472                 </links>
3473         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3474             <actions>
3475                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3476                 <retrieve/>
3477                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3478                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3479             </actions>
3480         </permacrud>
3481         </class>
3482         <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">
3483                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3484                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3485                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3486                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3487                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3488                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3489                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3490                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3491                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3492                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3493                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3494                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3495                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3496                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3497                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3498                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3499                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3500                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3501                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3502                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3503                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3504                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3505                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3506                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3507                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3508                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3509                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3510                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3511                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3512                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3513                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3514                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3515                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3516                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3517                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3518                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3519                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3520                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3521                 </fields>
3522                 <links>
3523                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3524                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3525                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3526                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3527                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3528                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3529                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3530                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3531                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3532                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3533                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3534                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3535                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3536                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3537                 </links>
3538         </class>
3539         <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">
3540                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3542                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3543                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3544                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3545                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3546                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3547                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3548                 </fields>
3549                 <links>
3550                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3551                 </links>
3552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3553                         <actions>
3554                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3555                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3556                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3557                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3558                         </actions>
3559                 </permacrud>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3563                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3564                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3565                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3566                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3567                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3568                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3569                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3570                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3571                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3572                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
3573                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3574                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3575                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3576                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3577                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3578                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3579                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3580                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3581                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3582                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3583                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3584                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3585                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3586                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3587                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3588                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3589                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3590                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3591                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3592                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3593                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3594                 </fields>
3595                 <links>
3596                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3597                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3598                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3599                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3600                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3601                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3602                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3603                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3604                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3605                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3606                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3607                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3608                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3609                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3610                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3611                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3612                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3613                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3614                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3615                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3616                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3617                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3618                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3619                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3620                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3621                 </links>
3622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3623             <actions>
3624                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3625                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3626                     <context field="id"/>
3627                     <context field="parent_ou"/>
3628                                 </retrieve>
3629                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3630                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3631             </actions>
3632         </permacrud>
3633         </class>
3634         <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">
3635                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3636                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field name="btype" reporter:datatype="text"/>
3638                         <field name="id" reporter:datatype="id" />
3639                         <field name="name"  reporter:datatype="text"/>
3640                         <field name="owner" reporter:datatype="link"/>
3641                         <field name="pub" reporter:datatype="bool"/>
3642                         <field name="create_time" reporter:datatype="timestamp" />
3643                 </fields>
3644                 <links>
3645                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3646                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3647                 </links>
3648         </class>
3649         <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">
3650                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3651                         <field name="id" reporter:datatype="id" />
3652                         <field name="bucket" reporter:datatype="link"/>
3653                         <field name="note" reporter:datatype="text" />
3654                 </fields>
3655                 <links>
3656                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3657                 </links>
3658         </class>
3659         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3660                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3661                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3662                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3663                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3664                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3665                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3666                 </fields>
3667                 <links>
3668                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3669                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3670                 </links>
3671         </class>
3672         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3673                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3674                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3675                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3676                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3677                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3678                 </fields>
3679                 <links>
3680                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3681                 </links>
3682         </class>
3683         <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">
3684                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3685                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3686                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3687                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3688                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3689                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3690                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3691                 </fields>
3692                 <links>
3693                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3694                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3695                 </links>
3696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3697             <actions>
3698                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3699                 <retrieve />
3700                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3701                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3702             </actions>
3703         </permacrud>
3704         </class>
3705         <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">
3706                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3707                         <field name="field" reporter:datatype="link"/>
3708                         <field name="id" reporter:datatype="id" />
3709                         <field name="source" reporter:datatype="link"/>
3710                         <field name="value"  reporter:datatype="text"/>
3711                 </fields>
3712                 <links>
3713                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3714                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3715                 </links>
3716         </class>
3717         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3718                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3719                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3720                         <field name="btype" reporter:datatype="text"/>
3721                         <field name="id" reporter:datatype="id" />
3722                         <field name="name"  reporter:datatype="text"/>
3723                         <field name="owner" reporter:datatype="link"/>
3724                         <field name="pub" reporter:datatype="bool"/>
3725                         <field name="create_time" reporter:datatype="timestamp" />
3726                 </fields>
3727                 <links>
3728                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3729                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3730                 </links>
3731         </class>
3732         <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">
3733                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3734                         <field name="id" reporter:datatype="id" />
3735                         <field name="bucket" reporter:datatype="link"/>
3736                         <field name="note" reporter:datatype="text" />
3737                 </fields>
3738                 <links>
3739                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3740                 </links>
3741         </class>
3742         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3743                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3744                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3745                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3746                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3747                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3748                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3749                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3750                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3751                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3752                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3753                 </fields>
3754                 <links>
3755                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3756                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3757                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3758                 </links>
3759         </class>
3760         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3761                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3762                         <field name="id" reporter:datatype="id" />
3763                         <field name="ind1" />
3764                         <field name="ind2" />
3765                         <field name="record" />
3766                         <field name="subfield" />
3767                         <field name="tag" />
3768                         <field name="value" />
3769                 </fields>
3770                 <links>
3771                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3772                 </links>
3773         </class>
3774         <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">
3775                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3776                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3777                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3778                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3779                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3780                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3781                 </fields>
3782                 <links>
3783                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3784                 </links>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3788                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3789                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3790                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3791                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3792                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3793                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3794                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3795                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3796                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3797                 </fields>
3798                 <links>
3799                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3800                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3801                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3802                 </links>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3806                 <retrieve/>
3807                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3808                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3809             </actions>
3810         </permacrud>
3811         </class>
3812         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3813                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3814                         <field name="create_date" reporter:datatype="timestamp"/>
3815                         <field name="creator" reporter:datatype="link"/>
3816                         <field name="edit_date" reporter:datatype="timestamp"/>
3817                         <field name="editor" reporter:datatype="link"/>
3818                         <field name="id" reporter:datatype="id" />
3819                         <field name="pub" reporter:datatype="bool"/>
3820                         <field name="record" reporter:datatype="link"/>
3821                         <field name="value"  reporter:datatype="text"/>
3822                 </fields>
3823                 <links>
3824                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3825                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3826                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3827                 </links>
3828         </class>
3829         <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">
3830                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3831                         <field name="balance_owed" reporter:datatype="money" />
3832                         <field name="total_owed" reporter:datatype="money" />
3833                         <field name="total_paid" reporter:datatype="money" />
3834                         <field name="usr" reporter:datatype="link"/>
3835                 </fields>
3836                 <links>
3837                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3838                 </links>
3839         </class>
3840         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3842                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3843                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3844                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3845                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3846                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3847                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3848                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3849                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3850                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3851                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3852                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3853                 </fields>
3854                 <links>
3855                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3856                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3857                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3858                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3859                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3860                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3861                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3862                 </links>
3863         </class>
3864         <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">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3866                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3867                         <field name="quality" reporter:datatype="int" />
3868                         <field name="source" reporter:datatype="text"/>
3869                         <field name="transcendant" reporter:datatype="bool"/>
3870                 </fields>
3871                 <links/>
3872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3873             <actions>
3874                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3875                 <retrieve/>
3876                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3877                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3878             </actions>
3879         </permacrud>
3880         </class>
3881         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3882                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3883                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3884                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3885                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3886                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3887                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3888                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3889                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3890                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3891                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3892                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3893                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3894                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3895                 </fields>
3896                 <links>
3897                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3898                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3899                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3900                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3901                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3902                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3903                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3904                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3905                 </links>
3906         </class>
3907         <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">
3908                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3909                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3910                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3911                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3912                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3913                 </fields>
3914                 <links>
3915                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3916                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3917                 </links>
3918         </class>
3919         <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">
3920                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3921                         <field name="bucket" reporter:datatype="link"/>
3922                         <field name="id" reporter:datatype="id" />
3923                         <field name="target_user" reporter:datatype="link"/>
3924                         <field name="create_time" reporter:datatype="timestamp" />
3925                         <field name="pos" reporter:datatype="int" />
3926                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3927                 </fields>
3928                 <links>
3929                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3930                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3931             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3932                 </links>
3933         </class>
3934         <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">
3935                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3936                         <field name="id" reporter:datatype="id" />
3937                         <field name="item" reporter:datatype="link"/>
3938                         <field name="note" reporter:datatype="text" />
3939                 </fields>
3940                 <links>
3941                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3942                 </links>
3943         </class>
3944         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3945                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3946                         <field name="balance_owed" reporter:datatype="money" />
3947                         <field name="total_owed" reporter:datatype="money" />
3948                         <field name="total_paid" reporter:datatype="money" />
3949                         <field name="usr" reporter:datatype="link"/>
3950                 </fields>
3951                 <links>
3952                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3953                 </links>
3954         </class>
3955         <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">
3956                 <fields oils_persist:primary="code" oils_persist:sequence="">
3957                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3958                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3959                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3960                 </fields>
3961                 <links/>
3962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3963             <actions>
3964                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3965                 <retrieve/>
3966                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3967                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3968             </actions>
3969         </permacrud>
3970         </class>
3971         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3972                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3973                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3974                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3975                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3976                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3977                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3978                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3979                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3980                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3981                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3982                 </fields>
3983                 <links>
3984                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3985                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3986                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3987                 </links>
3988         </class>
3989         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3990                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3991                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3992                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3993                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3994                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3995                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3996                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3997                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3998                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3999                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4000                 </fields>
4001                 <links>
4002                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4003                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4004                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4005                 </links>
4006         </class>
4007         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4008                 <fields oils_persist:primary="id" oils_persist:sequence="">
4009                         <field name="checkin_lib" reporter:datatype="link"/>
4010                         <field name="checkin_staff" reporter:datatype="link"/>
4011                         <field name="checkin_time" reporter:datatype="timestamp"/>
4012                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4013                         <field name="circ_staff" reporter:datatype="link"/>
4014                         <field name="desk_renewal" reporter:datatype="bool"/>
4015                         <field name="due_date" reporter:datatype="timestamp"/>
4016                         <field name="duration" reporter:datatype="interval"/>
4017                         <field name="duration_rule" reporter:datatype="link"/>
4018                         <field name="fine_interval" reporter:datatype="interval"/>
4019                         <field name="id" reporter:datatype="id" />
4020                         <field name="max_fine" reporter:datatype="money" />
4021                         <field name="max_fine_rule" reporter:datatype="link"/>
4022                         <field name="opac_renewal" reporter:datatype="bool"/>
4023                         <field name="phone_renewal" reporter:datatype="bool"/>
4024                         <field name="recurring_fine" reporter:datatype="money" />
4025                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4026                         <field name="renewal_remaining" reporter:datatype="int" />
4027                         <field name="stop_fines" reporter:datatype="text"/>
4028                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4029                         <field name="target_copy" reporter:datatype="link"/>
4030                         <field name="usr" reporter:datatype="link"/>
4031                         <field name="xact_finish" reporter:datatype="timestamp" />
4032                         <field name="xact_start" reporter:datatype="timestamp" />
4033                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4034                 </fields>
4035                 <links>
4036                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4037                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4038                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4039                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4040                 </links>
4041         </class>
4042         <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">
4043                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4044                         <field name="field" reporter:datatype="link"/>
4045                         <field name="id" reporter:datatype="id" />
4046                         <field name="source" reporter:datatype="link"/>
4047                         <field name="value" reporter:datatype="text"/>
4048                 </fields>
4049                 <links>
4050                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4051                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4052                 </links>
4053         </class>
4054         <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">
4055                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4056                         <field name="high" reporter:datatype="money" />
4057                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4058                         <field name="low" reporter:datatype="money" />
4059                         <field name="name" reporter:datatype="text"/>
4060                         <field name="normal" reporter:datatype="money" />
4061                         <field name="recurrence_interval" reporter:datatype="interval"/>
4062                 </fields>
4063                 <links/>
4064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4065             <actions>
4066                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4067                 <retrieve/>
4068                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4069                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4070             </actions>
4071         </permacrud>
4072         </class>
4073         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4074                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4075                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4076                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4077                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4078                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4079                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4080                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4081                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4082                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4083                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4084                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4086                 </fields>
4087                 <links>
4088                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4089                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4090                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4091                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4092                 </links>
4093         </class>
4094         <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">
4095                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4096                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4097                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4098                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4099                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4100                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4101                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4102                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4103                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4104                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4105                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4106                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4107                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4108                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4109                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4110                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4111                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4112                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4113                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4114                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4115                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4116                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4117                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4118                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4119                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4120                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4121                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4122                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4123                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4124                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4125                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4126                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4127                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4128                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4129                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4130                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4131                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4132                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4133                 </fields>
4134                 <links>
4135                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4136                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4137                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4138                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4139                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4140                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4141                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4142                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4143                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4144                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4145                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4146                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4147                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4148                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4149                 </links>
4150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4151             <actions>
4152                 <create permission="CREATE_COPY">
4153                     <context link="call_number" field="owning_lib"/>
4154                 </create>
4155                 <retrieve/>
4156                 <update permission="UPDATE_COPY">
4157                     <context link="call_number" field="owning_lib"/>
4158                 </update>
4159                 <delete permission="DELETE_COPY">
4160                     <context link="call_number" field="owning_lib"/>
4161                 </delete>
4162             </actions>
4163         </permacrud>
4164         </class>
4165
4166         <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">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4168                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4169                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4170                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4171                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4172                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4173                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4174                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4175                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4176                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4177                         <field reporter:label="Location" name="location" reporter:datatype="int"/>
4178                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4179                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4180                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4181                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4182                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4183                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4184                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4185                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4186                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4187                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
4188                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4189                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4190                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4191                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4192                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4193                 </fields>
4194                 <links>
4195                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4196                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4197                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4198                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4199                 </links>
4200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4201                 </permacrud>
4202         </class>
4203
4204         <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">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4206                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4207                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4208                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4209                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4210                 </fields>
4211                 <links/>
4212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4213             <actions>
4214                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4215                 <retrieve/>
4216                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4217                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4218             </actions>
4219         </permacrud>
4220         </class>
4221         <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">
4222                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4223                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4224                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4225                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4226                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4227                 </fields>
4228                 <links/>
4229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4230             <actions>
4231                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4232                 <retrieve/>
4233                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4234                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4235             </actions>
4236         </permacrud>
4237         </class>
4238         <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">
4239                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4240                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4241                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4242                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4243                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4244                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4245                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4246                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4247                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4248                 </fields>
4249                 <links>
4250                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4251                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4252                 </links>
4253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4254             <actions>
4255                 <create permission="CREATE_PERM" global_required="true"/>
4256                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4257                 <update permission="UPDATE_PERM" global_required="true"/>
4258                 <delete permission="DELETE_PERM" global_required="true"/>
4259             </actions>
4260         </permacrud>
4261         </class>
4262         <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">
4263                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4264                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4265                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4266                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4267                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4268                 </fields>
4269                 <links>
4270                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4271                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4272                 </links>
4273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4274             <actions>
4275                 <create permission="ADMIN_SURVEY">
4276                     <context link="question" jump="survey" field="owner"/>
4277                 </create>
4278                 <retrieve/>
4279                 <update permission="ADMIN_SURVEY">
4280                     <context link="question" jump="survey" field="owner"/>
4281                 </update>
4282                 <delete permission="ADMIN_SURVEY">
4283                     <context link="question" jump="survey" field="owner"/>
4284                 </delete>
4285             </actions>
4286         </permacrud>
4287         </class>
4288         <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">
4289                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4290                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4291                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4292                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4293                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4294                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4295                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
4296                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
4297                 </fields>
4298                 <links>
4299                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
4300                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4301                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4302                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4303                 </links>
4304         </class>
4305         <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">
4306                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4307                         <field name="balance_owed" reporter:datatype="money" />
4308                         <field name="total_owed" reporter:datatype="money" />
4309                         <field name="total_paid" reporter:datatype="money" />
4310                         <field name="usr" reporter:datatype="link"/>
4311                 </fields>
4312                 <links>
4313                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4314                 </links>
4315         </class>
4316         <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">
4317                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4318                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4319                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4320                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4321                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4322                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4323                 </fields>
4324                 <links>
4325                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4326                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4327                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4328                 </links>
4329         </class>
4330         <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">
4331                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
4332                         <field name="field" reporter:datatype="link"/>
4333                         <field name="id" reporter:datatype="id" />
4334                         <field name="source" reporter:datatype="link"/>
4335                         <field name="value" reporter:datatype="text"/>
4336                 </fields>
4337                 <links>
4338                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4339                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4340                 </links>
4341         </class>
4342         <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">
4343                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4344                         <field name="field" reporter:datatype="link"/>
4345                         <field name="id" reporter:datatype="id" />
4346                         <field name="source" reporter:datatype="link"/>
4347                         <field name="value" reporter:datatype="text"/>
4348                 </fields>
4349                 <links>
4350                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4351                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4352                 </links>
4353         </class>
4354         <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">
4355                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4356                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4357                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4358                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4359                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4360                 </fields>
4361                 <links>
4362                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4363                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4364                 </links>
4365         </class>
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4368                         <field name="depth" reporter:datatype="int" />
4369                         <field name="grantable" reporter:datatype="bool"/>
4370                         <field name="grp" reporter:datatype="link"/>
4371                         <field name="id" reporter:datatype="id" />
4372                         <field name="perm" reporter:datatype="link"/>
4373                 </fields>
4374                 <links>
4375                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4376                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4377                 </links>
4378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4379             <actions>
4380                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4381                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4382                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4383                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4384             </actions>
4385         </permacrud>
4386         </class>
4387         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4388                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4389                         <field name="items" oils_persist:virtual="true" />
4390                         <field name="btype" reporter:datatype="text"/>
4391                         <field name="id" reporter:datatype="id" />
4392                         <field name="name" reporter:datatype="text"/>
4393                         <field name="owner" reporter:datatype="link"/>
4394                         <field name="pub" reporter:datatype="bool"/>
4395                         <field name="create_time" reporter:datatype="timestamp" />
4396                 </fields>
4397                 <links>
4398                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4399                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4400                 </links>
4401         </class>
4402         <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">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4404                         <field name="id" reporter:datatype="id" />
4405                         <field name="bucket" reporter:datatype="link"/>
4406                         <field name="note" reporter:datatype="text" />
4407                 </fields>
4408                 <links>
4409                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4410                 </links>
4411         </class>
4412         <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">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4414                         <field name="id" reporter:datatype="int" />
4415                         <field name="usr" reporter:datatype="link"/>
4416                         <field name="work_ou" reporter:datatype="link"/>
4417                 </fields>
4418                 <links>
4419                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4420                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4421                 </links>
4422         </class>
4423         <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">
4424                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4425                         <field name="depth" reporter:datatype="int"/>
4426                         <field name="grantable" reporter:datatype="bool"/>
4427                         <field name="id" reporter:datatype="id" />
4428                         <field name="perm" reporter:datatype="link"/>
4429                         <field name="usr" reporter:datatype="link"/>
4430                 </fields>
4431                 <links>
4432                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4433                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4434                 </links>
4435         </class>
4436         <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">
4437                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4438                         <field name="object_id" reporter:datatype="text"/>
4439                         <field name="grantable" reporter:datatype="bool"/>
4440                         <field name="id" reporter:datatype="id" />
4441                         <field name="perm" reporter:datatype="link"/>
4442                         <field name="usr" reporter:datatype="link"/>
4443                         <field name="object_type" reporter:datatype="text"/>
4444                 </fields>
4445                 <links>
4446                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4447                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4448                 </links>
4449         </class>
4450         <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">
4451                 <fields oils_persist:primary="id" oils_persist:sequence="">
4452                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4453                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4454                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4455                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4456                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4457                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4458                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4459                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4460                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4461                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4462                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4463                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4464                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4465                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4466                 </fields>
4467                 <links>
4468                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4469                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4470                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4471                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4472                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4473                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4474                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4475                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4476                 </links>
4477         </class>
4478         <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">
4479                 <fields oils_persist:primary="id" oils_persist:sequence="">
4480                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4481                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4482                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4483                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4484                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4485                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4486                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4487                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4488                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4489                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4490                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4491                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4492                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4493                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4494                 </fields>
4495                 <links>
4496                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4497                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4498                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4499                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4500                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4501                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4502                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4503                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4504                 </links>
4505         </class>
4506         <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">
4507                 <fields oils_persist:primary="id" oils_persist:sequence="">
4508                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4509                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4510                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4511                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4512                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4513                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4514                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4515                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4516                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4517                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4518                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4519                 </fields>
4520                 <links>
4521                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4522                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4523                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4524                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4525                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4526                 </links>
4527         </class>
4528         <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">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="">
4530                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4531                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4532                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4533                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4534                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4535                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4536                         <field reporter:label="Accepting User" name="accepting_usr" />
4537                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4538                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4539                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4540                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4541                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4542                 </fields>
4543                 <links>
4544                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4545                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4546                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4547                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4548                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4549                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4550                 </links>
4551         </class>
4552         <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">
4553                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4554                         <field name="bucket" reporter:datatype="link"/>
4555                         <field name="id" reporter:datatype="id" />
4556                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4557                         <field name="create_time" reporter:datatype="timestamp" />
4558                         <field name="pos" reporter:datatype="int" />
4559                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4560                 </fields>
4561                 <links>
4562                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4563                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4564             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4565                 </links>
4566         </class>
4567         <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">
4568                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4569                         <field name="id" reporter:datatype="id" />
4570                         <field name="item" reporter:datatype="link"/>
4571                         <field name="note" reporter:datatype="text" />
4572                 </fields>
4573                 <links>
4574                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4575                 </links>
4576         </class>
4577         <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">
4578                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4579                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4580                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4581                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4582                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4583                 </fields>
4584                 <links>
4585                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4586                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4587                 </links>
4588         </class>
4589
4590         <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">
4591                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4592                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4593                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4594                 </fields>
4595                 <links/>
4596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4597             <actions>
4598                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4599                 <retrieve/>
4600                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4601                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4602             </actions>
4603         </permacrud>
4604         </class>
4605
4606
4607         <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">
4608                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4609                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4610                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4611                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4612                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4613                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4614                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4615                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4616                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4617                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4618                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4619                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4620                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4621                 </fields>
4622                 <links>
4623                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4624                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4625                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4626                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4627                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4628                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4629                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4630                 </links>
4631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4632             <actions>
4633                 <create permission="TRANSIT_COPY">
4634                     <context link="target_copy" field="owner"/>
4635                 </create>
4636                 <retrieve/>
4637                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4638                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4639             </actions>
4640         </permacrud>
4641         </class>
4642         <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">
4643                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4644                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4645                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4646                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4647                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4648                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4649                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4650                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4651                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4652                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4653                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4654                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4655                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4656                 </fields>
4657                 <links>
4658                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4659                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4660                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4661                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4662                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4663                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4664                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4665                 </links>
4666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4667             <actions>
4668                 <create permission="TRANSIT_COPY" context_field="owner">
4669                     <context link="target_copy" field="circ_lib"/>
4670                 </create>
4671                 <retrieve/>
4672                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4673                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4674             </actions>
4675         </permacrud>
4676         </class>
4677         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4678                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4679                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4680                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4681                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4682                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4683                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4684                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4685                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4686                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4687                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4688                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4689                 </fields>
4690                 <links>
4691                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4692                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4693                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4694                 </links>
4695         </class>
4696         <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">
4697                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4698                         <field name="grp" />
4699                         <field name="id" reporter:datatype="id" />
4700                         <field name="usr" />
4701                 </fields>
4702                 <links>
4703                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4704                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4705                 </links>
4706         </class>
4707         <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">
4708                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4709                         <field name="id" reporter:datatype="id" />
4710                         <field name="fq_field" reporter:datatype="text"/>
4711                         <field name="identity_value" reporter:datatype="text"/>
4712                         <field name="translation" reporter:datatype="text"/>
4713                         <field name="string" reporter:datatype="text"/>
4714                 </fields>
4715                 <links>
4716                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4717                 </links>
4718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4719             <actions>
4720                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4721                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4722                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4723                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4724             </actions>
4725         </permacrud>
4726         </class>
4727         <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">
4728                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4729                         <field name="id" reporter:datatype="id" />
4730                         <field name="fm_class" reporter:datatype="text"/>
4731                         <field name="field" reporter:datatype="text"/>
4732                         <field name="owner" reporter:datatype="org_unit"/>
4733                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4734                 </fields>
4735                 <links>
4736                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4737                 </links>
4738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4739             <actions>
4740                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4741                 <retrieve/>
4742                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4743                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4744             </actions>
4745         </permacrud>
4746         </class>
4747         <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">
4748                 <fields oils_persist:primary="code">
4749                         <field name="code" reporter:datatype="id" />
4750                         <field name="marc_code" reporter:datatype="text"/>
4751                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4752                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4753                 </fields>
4754                 <links/>
4755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4756             <actions>
4757                 <create permission="CREATE_LOCALE" global_required="true"/>
4758                 <retrieve/>
4759                 <update permission="UPDATE_LOCALE" global_required="true"/>
4760                 <delete permission="DELETE_LOCALE" global_required="true"/>
4761             </actions>
4762         </permacrud>
4763         </class>
4764         <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">
4765                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4766                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4767                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4768                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4769             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4770                 </fields>
4771                 <links>
4772                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4773                 </links>
4774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4775             <actions>
4776                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4777                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4778                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4779                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4780             </actions>
4781         </permacrud>
4782         </class>
4783
4784         <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">
4785                 <fields oils_persist:primary="id">
4786                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4787                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4788                 </fields>
4789                 <links/>
4790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4791             <actions>
4792                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4793                 <retrieve/>
4794                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4795                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
4796             </actions>
4797         </permacrud>
4798         </class>
4799
4800         <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">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
4802                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
4803                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4804                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
4805                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
4806                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
4807                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
4808                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
4809                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
4810                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4811                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
4812                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
4813                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
4814                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
4815                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
4816                         <field reporter:label="Title" name="title" reporter:datatype="text" />
4817                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
4818                         <field reporter:label="Author" name="author" reporter:datatype="text" />
4819                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
4820                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
4821                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
4822                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
4823                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
4824                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
4825                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
4826                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
4827                 </fields>
4828                 <links>
4829                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4830                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4831                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4832                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
4833                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
4834                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
4835                 </links>
4836         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4837             <actions>
4838                 <create permission="user_request.create">
4839                     <context link="usr" field="home_ou"/>
4840                                 </create>
4841                 <retrieve permission="user_request.view">
4842                     <context link="usr" field="home_ou"/>
4843                                 </retrieve>
4844                 <update permission="user_request.update">
4845                     <context link="usr" field="home_ou"/>
4846                                 </update>
4847                 <delete permission="user_request.delete">
4848                     <context link="usr" field="home_ou"/>
4849                                 </delete>
4850             </actions>
4851         </permacrud>
4852         </class>
4853
4854         <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">
4855                 <fields oils_persist:primary="code">
4856                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4857                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4858                 </fields>
4859                 <links/>
4860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4861             <actions>
4862                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4863                 <retrieve/>
4864                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4865                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4866             </actions>
4867         </permacrud>
4868         </class>
4869
4870         <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">
4871                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4872                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4873                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4874                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4875                         <field reporter:label="Ratio" name="ratio" />
4876                 </fields>
4877                 <links>
4878                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4879                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4880                 </links>
4881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4882                         <actions>
4883                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4884                                 <retrieve/>
4885                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4886                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4887                         </actions>
4888                 </permacrud>
4889         </class>
4890
4891         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4892                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4893                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4894                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4895                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4896                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4897                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4898                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4899                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4900                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4901                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4902                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4903                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
4904                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4905                         <field reporter:label="Email" name="email" reporter:datatype="text" />
4906                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
4907                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
4908                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
4909                 </fields>
4910                 <links>
4911                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4912                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4913             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4914             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4915             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
4916                 </links>
4917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4918             <actions>
4919                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4920                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4921                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4922                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4923             </actions>
4924         </permacrud>
4925         </class>
4926
4927         <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">
4928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
4929                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4930                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4931                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4932                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4933                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4934                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4935                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
4936                 </fields>
4937                 <links>
4938                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4939                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4940                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4941                 </links>
4942         </class>
4943
4944         <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">
4945                 <fields oils_persist:primary="code">
4946                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
4947                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4948                 </fields>
4949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4950             <actions>
4951                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4952                 <retrieve/>
4953                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4954                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
4955             </actions>
4956                 </permacrud>
4957         </class>
4958
4959         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
4960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
4961                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
4962                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
4963                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4964                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
4965                         <field reporter:label="Receive Date/Time" name="recv_date" reporter:datatype="timestamp" />
4966                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
4967                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
4968                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
4969                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
4970                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
4971                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4972                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
4973                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
4974                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
4975                 </fields>
4976                 <links>
4977                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
4978                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4979                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
4980                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
4981                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
4982                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
4983                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
4984                 </links>
4985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4986             <actions>
4987                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
4988                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
4989                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
4990                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
4991             </actions>
4992         </permacrud>
4993         </class>
4994
4995         <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">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
4997                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4998                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
4999                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5000                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5001                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5002                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5003                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5004                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5005                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5006                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5007                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5008                 </fields>
5009                 <links>
5010                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5011                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5012                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5013                 </links>
5014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5015             <actions>
5016                 <create   permission="ADMIN_INVOICE">
5017                                         <context link="invoice" field="receiver"/>
5018                                 </create>
5019                 <retrieve permission="ADMIN_INVOICE">
5020                                         <context link="invoice" field="receiver"/>
5021                                 </retrieve>
5022                 <update   permission="ADMIN_INVOICE">
5023                                         <context link="invoice" field="receiver"/>
5024                                 </update>
5025                                 <delete   permission="ADMIN_INVOICE">
5026                                         <context link="invoice" field="receiver"/>
5027                                 </delete>
5028             </actions>
5029         </permacrud>
5030         </class>
5031
5032         <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">
5033                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5034                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5035                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5036                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5037                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5038                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5039                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5040                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5041                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5042                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5043                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5044                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5045                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5046                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5047                 </fields>
5048                 <links>
5049                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5050                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5051                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5052                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5053                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5054                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5055                 </links>
5056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5057             <actions>
5058                 <create   permission="ADMIN_INVOICE">
5059                                         <context link="invoice" field="receiver"/>
5060                                 </create>
5061                 <retrieve permission="ADMIN_INVOICE">
5062                                         <context link="invoice" field="receiver"/>
5063                                 </retrieve>
5064                 <update   permission="ADMIN_INVOICE">
5065                                         <context link="invoice" field="receiver"/>
5066                                 </update>
5067                                 <delete   permission="ADMIN_INVOICE">
5068                                         <context link="invoice" field="receiver"/>
5069                                 </delete>
5070             </actions>
5071         </permacrud>
5072         </class>
5073
5074         <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">
5075                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5076                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5077                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5078                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5079                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5080                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5081                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5082                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5083                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5084                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5085                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5086                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5087                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5088                 </fields>
5089                 <links>
5090                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5091                 </links>
5092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5093             <actions>
5094                 <create permission="ADMIN_PROVIDER">
5095                     <context link="provider" field="owner"/>
5096                 </create>
5097                 <retrieve permission="ADMIN_PROVIDER">
5098                     <context link="provider" field="owner"/>
5099                 </retrieve>
5100                 <update permission="ADMIN_PROVIDER">
5101                     <context link="provider" field="owner"/>
5102                 </update>
5103                 <delete permission="ADMIN_PROVIDER">
5104                     <context link="provider" field="owner"/>
5105                 </delete>
5106             </actions>
5107         </permacrud>
5108         </class>
5109
5110         <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">
5111                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5112                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5113                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5114                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5115                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5116                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5117                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5118         </fields>
5119                 <links>
5120                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5121                 </links>
5122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5123             <actions>
5124                 <create permission="ADMIN_PROVIDER">
5125                     <context link="provider" field="owner"/>
5126                 </create>
5127                 <retrieve permission="ADMIN_PROVIDER">
5128                     <context link="provider" field="owner"/>
5129                 </retrieve>
5130                 <update permission="ADMIN_PROVIDER">
5131                     <context link="provider" field="owner"/>
5132                 </update>
5133                 <delete permission="ADMIN_PROVIDER">
5134                     <context link="provider" field="owner"/>
5135                 </delete>
5136             </actions>
5137         </permacrud>
5138     </class>
5139         <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">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5141                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5142                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5143                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5144                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5145                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5146                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5147                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5148                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5149                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5150                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5151                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5152                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5153                 </fields>
5154                 <links>
5155                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5156                 </links>
5157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5158             <actions>
5159                 <create permission="ADMIN_PROVIDER">
5160                     <context link="contact" jump='provider' field="owner"/>
5161                 </create>
5162                 <retrieve permission="ADMIN_PROVIDER">
5163                     <context link="contact" jump='provider' field="owner"/>
5164                 </retrieve>
5165                 <update permission="ADMIN_PROVIDER">
5166                     <context link="contact" jump='provider' field="owner"/>
5167                 </update>
5168                 <delete permission="ADMIN_PROVIDER">
5169                     <context link="contact" jump='provider' field="owner"/>
5170                 </delete>
5171             </actions>
5172         </permacrud>
5173         </class>
5174
5175         <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">
5176                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5177                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5178                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5179                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5180                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5181                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5182                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5183                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5184                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5185                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5186                 </fields>
5187                 <links>
5188                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5189                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5190                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5191                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5192                 </links>
5193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5194                 </permacrud>
5195         </class>
5196
5197         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5198                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5199                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5200                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5201                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5202                 </fields>
5203                 <links>
5204             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5205                 </links>
5206                 <!--
5207                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5208                         But here's what it should look like if we ever do use pcrud.
5209                 -->
5210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5211                         <actions>
5212                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5213                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5214                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5215                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5216                         </actions>
5217                 </permacrud>
5218         </class>
5219
5220         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5221                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5222                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
5223                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5224                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5225                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5226                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5227                 </fields>
5228                 <links>
5229                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5230                 </links>
5231                 <!--
5232                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5233                         But here's what it should look like if we ever do use pcrud.
5234                 -->
5235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5236                         <actions>
5237                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5238                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5239                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5240                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5241                         </actions>
5242                 </permacrud>
5243         </class>
5244
5245         <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">
5246                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5247                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5248                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5249                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5250                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5251                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5252                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5253                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5254                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5255                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5256                 </fields>
5257                 <links>
5258                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5260             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5261             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5262                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5263                 </links>
5264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5265             <actions>
5266                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5267                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5268                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5269                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5270             </actions>
5271         </permacrud>
5272         </class>
5273
5274         <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">
5275                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5276                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5277                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5278                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5279                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5280                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5281                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5282                 </fields>
5283                 <links>
5284                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5285                 </links>
5286                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5287                         <actions>
5288                                 <create permission="ADMIN_FUNDING_SOURCE">
5289                     <context link="funding_source" field="owner"/>
5290                 </create>
5291                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5292                     <context link="funding_source" field="owner"/>
5293                 </retrieve>
5294                                 <update permission="ADMIN_FUNDING_SOURCE">
5295                     <context link="funding_source" field="owner"/>
5296                 </update>
5297                                 <delete permission="ADMIN_FUNDING_SOURCE">
5298                     <context link="funding_source" field="owner"/>
5299                 </delete>
5300                         </actions>
5301                 </permacrud>
5302         </class>
5303
5304         <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">
5305                 <fields oils_persist:primary="id">
5306                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
5307                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
5308                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
5309                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
5310                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
5311                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5312                 </fields>
5313                 <links>
5314                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5315                 </links>
5316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5317                 </permacrud>
5318         </class>
5319
5320         <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">
5321                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
5322                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
5323                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5324                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
5325                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
5326                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5327                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
5328                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
5329                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5330                 </fields>
5331                 <links>
5332                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5333                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5334                 </links>
5335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5336                         <actions>
5337                                 <create permission="ADMIN_ACQ_FUND">
5338                     <context link="fund" field="org"/>
5339                 </create>
5340                                 <retrieve permission="ADMIN_ACQ_FUND">
5341                     <context link="fund" field="org"/>
5342                 </retrieve>
5343                                 <update permission="ADMIN_ACQ_FUND">
5344                     <context link="fund" field="org"/>
5345                 </update>
5346                                 <delete permission="ADMIN_ACQ_FUND">
5347                     <context link="fund" field="org"/>
5348                 </delete>
5349                         </actions>
5350                 </permacrud>
5351         </class>
5352
5353         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5354                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5355                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5356                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5357                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5358                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5359                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5360                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5361                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5362                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5363                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5364                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5365                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5366                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5367                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5368                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5369                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5370                 </fields>
5371                 <links>
5372                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5373                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5374             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5375             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5376             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5377                 </links>
5378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5379             <actions>
5380                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5381                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5382                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5383                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5384             </actions>
5385         </permacrud>
5386         </class>
5387
5388         <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">
5389                 <fields oils_persist:primary="fund">
5390                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5391                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5392                 </fields>
5393                 <links>
5394                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5395                 </links>
5396         </class>
5397
5398         <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">
5399                 <fields oils_persist:primary="fund">
5400                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5401                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5402                 </fields>
5403                 <links>
5404                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5405                 </links>
5406         </class>
5407
5408         <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">
5409                 <fields oils_persist:primary="fund">
5410                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5411                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5412                 </fields>
5413                 <links>
5414                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5415                 </links>
5416         </class>
5417
5418         <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">
5419                 <fields oils_persist:primary="fund">
5420                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5421                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5422                 </fields>
5423                 <links>
5424                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5425                 </links>
5426         </class>
5427
5428         <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">
5429                 <fields oils_persist:primary="fund">
5430                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5431                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5432                 </fields>
5433                 <links>
5434                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5435                 </links>
5436         </class>
5437
5438    <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">
5439         <fields oils_persist:primary="fund">
5440             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5441             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5442         </fields>
5443         <links>
5444             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5445         </links>
5446     </class>
5447
5448    <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">
5449         <fields oils_persist:primary="fund">
5450             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5451             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5452         </fields>
5453         <links>
5454             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5455         </links>
5456     </class>
5457
5458    <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">
5459         <fields oils_persist:primary="fund">
5460             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5461             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5462         </fields>
5463         <links>
5464             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5465         </links>
5466     </class>
5467
5468    <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">
5469         <fields oils_persist:primary="fund">
5470             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5471             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
5472         </fields>
5473         <links>
5474             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5475         </links>
5476     </class>
5477
5478    <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">
5479         <fields oils_persist:primary="fund">
5480             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5481             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
5482         </fields>
5483         <links>
5484             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5485         </links>
5486     </class>
5487
5488         <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">
5489                 <fields oils_persist:primary="funding_source">
5490                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5491                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
5492                 </fields>
5493                 <links>
5494                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5495                 </links>
5496         </class>
5497
5498         <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">
5499                 <fields oils_persist:primary="funding_source">
5500                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5501                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
5502                 </fields>
5503                 <links>
5504                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5505                 </links>
5506         </class>
5507
5508         <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">
5509                 <fields oils_persist:primary="funding_source">
5510                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5511                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
5512                 </fields>
5513                 <links>
5514                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5515                 </links>
5516         </class>
5517
5518         <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">
5519                 <fields oils_persist:primary="fund">
5520                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5521                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
5522                 </fields>
5523                 <links>
5524                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5525                 </links>
5526         </class>
5527
5528         <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">
5529                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
5530                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5531                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5532                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5533                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5534                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5535                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5536                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5537                 </fields>
5538                 <links>
5539                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5540                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5541                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5542                 </links>
5543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5544                         <actions>
5545                                 <create permission="ADMIN_ACQ_FUND">
5546                     <context link="fund" field="org"/>
5547                 </create>
5548                                 <retrieve permission="ADMIN_ACQ_FUND">
5549                     <context link="fund" field="org"/>
5550                 </retrieve>
5551                                 <update permission="ADMIN_ACQ_FUND">
5552                     <context link="fund" field="org"/>
5553                 </update>
5554                                 <delete permission="ADMIN_ACQ_FUND">
5555                     <context link="fund" field="org"/>
5556                 </delete>
5557                         </actions>
5558                 </permacrud>
5559         </class>
5560
5561     <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">
5562         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
5563             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
5564             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
5565             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5566             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
5567             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
5568             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
5569             <field reporter:label="Note" name="note" reporter:datatype="text" />
5570             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5571         </fields>
5572         <links>
5573             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
5574             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5575             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5576         </links>
5577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5578                         <actions>
5579                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5580                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5581                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5582                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
5583                         </actions>
5584                 </permacrud>
5585     </class>
5586
5587         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
5588                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
5589                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
5590                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5591                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
5592                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5593                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5594                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5595                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
5596                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
5597                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5598                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5599                 </fields>
5600                 <links>
5601                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5602                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5603                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5604                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5605                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
5606                 </links>
5607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5608                         <actions>
5609                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
5610                         </actions>
5611                 </permacrud>
5612         </class>
5613
5614         <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">
5615                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
5616                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5617                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
5618                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5619                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5620                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
5621                 </fields>
5622                 <links>
5623                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5624                 </links>
5625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5626                         <actions>
5627                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5628                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
5629                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5630                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
5631                         </actions>
5632                 </permacrud>
5633         </class>
5634
5635         <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">
5636                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
5637                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5638                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
5639                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5640                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5641                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5642                         <field reporter:label="State" name="state" reporter:datatype="text" />
5643                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
5644                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5645                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5646                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
5647                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5648                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5649                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5650                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
5651                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5652                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
5653                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
5654                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
5655                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
5656                 </fields>
5657                 <links>
5658                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5659                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5660                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5661                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
5662                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5663                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
5664                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
5665                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
5666                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5667                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5668                 </links>
5669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5670                         <actions>
5671                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5672                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5673                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5674                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
5675                         </actions>
5676                 </permacrud>
5677         </class>
5678
5679         <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">
5680                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
5681                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5682                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5683                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5684                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
5685                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
5686                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5687                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5688                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
5689                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5690                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5692                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5693                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
5694                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5695                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5696                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5697                 </fields>
5698                 <links>
5699                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
5700                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5701                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5702                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5703                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
5704                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5705                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5706                 </links>
5707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5708             <actions>
5709                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
5710             </actions>
5711                 </permacrud>
5712         </class>
5713
5714         <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">
5715                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
5716                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5717                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5718                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5719                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5720                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5721                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5722                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
5723                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5724                 </fields>
5725                 <links>
5726                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5727                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5728                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5729                 </links>
5730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5731             <actions>
5732                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5733                     <context link="purchase_order" field="ordering_agency"/>
5734                 </retrieve>
5735                 <create permission="CREATE_PURCHASE_ORDER">
5736                     <context link="purchase_order" field="ordering_agency"/>
5737                 </create>
5738                 <update permission="CREATE_PURCHASE_ORDER">
5739                     <context link="purchase_order" field="ordering_agency"/>
5740                 </update>
5741                 <delete permission="CREATE_PURCHASE_ORDER">
5742                     <context link="purchase_order" field="ordering_agency"/>
5743                 </delete>
5744             </actions>
5745                 </permacrud>
5746         </class>
5747
5748         <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">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
5750                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5751                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5752                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5753                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
5754                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5755                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
5756                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5757                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
5758                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
5759                 </fields>
5760                 <links>
5761                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5762                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5763                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5764                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5765                 </links>
5766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5767             <actions>
5768                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5769                     <context link="purchase_order" field="ordering_agency"/>
5770                 </retrieve>
5771                 <create permission="CREATE_PURCHASE_ORDER">
5772                     <context link="purchase_order" field="ordering_agency"/>
5773                 </create>
5774                 <update permission="CREATE_PURCHASE_ORDER">
5775                     <context link="purchase_order" field="ordering_agency"/>
5776                 </update>
5777                 <delete permission="CREATE_PURCHASE_ORDER">
5778                     <context link="purchase_order" field="ordering_agency"/>
5779                 </delete>
5780             </actions>
5781                 </permacrud>
5782         </class>
5783
5784         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
5785                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
5786                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
5787                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
5788                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
5789                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
5790                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5791                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5792                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5793                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
5794                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
5795                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
5796                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
5797                         <field reporter:label="State" name="state" reporter:datatype="text" />
5798                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5799                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5800                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
5801                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5802                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5803                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
5804                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
5805                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
5806                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
5807                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
5808                         <field reporter:label="Envoice Enties" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
5809                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
5810                 </fields>
5811                 <links>
5812                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5813                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5814                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5815                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5816                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5817                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5818                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5819                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
5820                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
5821                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
5822                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5823                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
5824                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5825                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
5826                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
5827                 </links>
5828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5829                         <actions>
5830                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
5831                                         <context link="purchase_order" field="ordering_agency"/>
5832                                         <context link="picklist" field="org_unit"/>
5833                                 </retrieve>
5834                         </actions>
5835                 </permacrud>
5836         </class>
5837
5838         <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">
5839                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
5840                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
5841                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
5842                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
5843                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
5844                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5845                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5846                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
5847                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5848                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5849                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
5850                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
5851                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
5852                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
5853                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5854                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
5855                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
5856                         <field reporter:label="State" name="state" reporter:datatype="text"/>
5857                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
5858                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
5859                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
5860                 </fields>
5861                 <links>
5862                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
5863                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5864                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5865                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
5866                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5867                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5868                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
5869                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
5870                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5871                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
5872                 </links>
5873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5874                         <actions>
5875                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
5876                                         <context link="purchase_order" field="ordering_agency"/>
5877                                         <context link="picklist" field="org_unit"/>
5878                                 </retrieve>
5879                         </actions>
5880                 </permacrud>
5881         </class>
5882
5883         <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">
5884                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
5885                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
5886                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
5887                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5888                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
5889                 </fields>
5890                 <links>
5891                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5892                 </links>
5893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5894                         <actions>
5895                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5896                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
5897                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5898                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
5899                         </actions>
5900                 </permacrud>
5901         </class>
5902
5903         <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">
5904                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
5905                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
5906                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
5907                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5908                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5909                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5910                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5911                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5912                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
5913                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
5914                 </fields>
5915                 <links>
5916                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5917                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5918                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5919                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
5920                 </links>
5921         </class>
5922
5923         <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">
5924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
5925                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
5926                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
5927                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
5928                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
5929                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
5930                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
5931                 </fields>
5932                 <links>
5933                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5934                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
5935                 </links>
5936         </class>
5937
5938         <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">
5939                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5940                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5941                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5942                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5943                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5944                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5945                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5946                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5947                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5948                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5949                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5950                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5951                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5952                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5953                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5954                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
5955                 </fields>
5956                 <links>
5957                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5958                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5959                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5960                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5961                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5962                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5963                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5964                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5965                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
5966                 </links>
5967         </class>
5968
5969         <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">
5970                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5971                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5972                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5973                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5974                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5975                 </fields>
5976                 <links/>
5977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5978                         <actions>
5979                                 <retrieve />
5980                         </actions>
5981                 </permacrud>
5982         </class>
5983
5984         <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">
5985                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5986                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5987                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5988                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5989                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5990                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5991             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5992                 </fields>
5993                 <links/>
5994         <permacrud>
5995             <actions>
5996                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5997                 <retrieve />
5998                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
5999                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6000             </actions>
6001         </permacrud>
6002         </class>
6003
6004         <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">
6005                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6006                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6007                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6008                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6009                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6010                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6011                 </fields>
6012                 <links/>
6013         </class>
6014         <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">
6015                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6016                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6017                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6018                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6019                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6020                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6021                 </fields>
6022                 <links>
6023                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6024                 </links>
6025         </class>
6026
6027         <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">
6028             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6029                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6030                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6031                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6032                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6033                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6034                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6035         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6036
6037             </fields>
6038             <links>
6039                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6040             </links>
6041             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6042                 <actions>
6043                     <create permission="ADMIN_PROVIDER">
6044                         <context link="provider" field="owner"/>
6045                     </create>
6046                     <retrieve permission="ADMIN_PROVIDER">
6047                         <context link="provider" field="owner"/>
6048                     </retrieve>
6049                     <update permission="ADMIN_PROVIDER">
6050                         <context link="provider" field="owner"/>
6051                     </update>
6052                     <delete permission="ADMIN_PROVIDER">
6053                         <context link="provider" field="owner"/>
6054                     </delete>
6055                 </actions>
6056             </permacrud>
6057         </class>
6058         
6059         <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">
6060             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6061                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6062                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6063                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6064                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6065             </fields>
6066             <links>
6067                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6068             </links>
6069             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6070                 <actions>
6071                     <create permission="ADMIN_PROVIDER">
6072                         <context link="provider" field="owner"/>
6073                     </create>
6074                     <retrieve permission="ADMIN_PROVIDER">
6075                         <context link="provider" field="owner"/>
6076                     </retrieve>
6077                     <update permission="ADMIN_PROVIDER">
6078                         <context link="provider" field="owner"/>
6079                     </update>
6080                     <delete permission="ADMIN_PROVIDER">
6081                         <context link="provider" field="owner"/>
6082                     </delete>
6083                 </actions>
6084             </permacrud>
6085         </class>
6086         
6087         <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">
6088             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6089                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6090                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6091                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6092                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6093                 </fields>
6094                 <links/>
6095         </class>
6096
6097         <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">
6098                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6099                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6100                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6101                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6102                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6103                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6104                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6105                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6106                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6107                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6108                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6109                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6110                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6111                 </fields>
6112                 <links>
6113                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6114                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6115                 </links>
6116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6117             <actions>
6118                 <create permission="ADMIN_PROVIDER">
6119                     <context link="provider" field="owner"/>
6120                 </create>
6121                 <retrieve permission="ADMIN_PROVIDER">
6122                     <context link="provider" field="owner"/>
6123                 </retrieve>
6124                 <update permission="ADMIN_PROVIDER">
6125                     <context link="provider" field="owner"/>
6126                 </update>
6127                 <delete permission="ADMIN_PROVIDER">
6128                     <context link="provider" field="owner"/>
6129                 </delete>
6130             </actions>
6131         </permacrud>
6132         </class>
6133
6134         <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">
6135                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6136                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6137                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6138                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6139                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6140                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6141                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6142                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6143                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6144                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6145                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6146                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6147                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6148                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6149                 </fields>
6150                 <links>
6151                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6152                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6153                 </links>
6154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6155             <actions>
6156                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6157                     <context link="account" jump="provider" field="owner"/>
6158                 </retrieve>
6159                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6160                     <context link="account" jump="provider" field="owner"/>
6161                 </update>
6162                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6163                     <context link="account" jump="provider" field="owner"/>
6164                 </delete>
6165             </actions>
6166         </permacrud>
6167         </class>
6168
6169
6170         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6171                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6172                         <field name="id" reporter:datatype="id" />
6173                         <field name="parent" reporter:datatype="link"/>
6174                         <field name="owner" reporter:datatype="link"/>
6175                         <field name="create_time" reporter:datatype="timestamp"/>
6176                         <field name="name" reporter:datatype="text"/>
6177                         <field name="shared" reporter:datatype="bool"/>
6178                         <field name="share_with" reporter:datatype="link"/>
6179                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6180                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6181                 </fields>
6182                 <links>
6183                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6184                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6185                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6186                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6187                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6188                 </links>
6189         </class>
6190         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6191                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6192                         <field name="id" reporter:datatype="id" />
6193                         <field name="parent" reporter:datatype="link"/>
6194                         <field name="owner" reporter:datatype="link"/>
6195                         <field name="create_time" reporter:datatype="timestamp"/>
6196                         <field name="name" reporter:datatype="text"/>
6197                         <field name="shared" reporter:datatype="bool"/>
6198                         <field name="share_with" reporter:datatype="link"/>
6199                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6200                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6201                 </fields>
6202                 <links>
6203                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6204                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6205                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6206                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6207                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6208                 </links>
6209         </class>
6210         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6211                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6212                         <field name="id" reporter:datatype="id" />
6213                         <field name="parent" reporter:datatype="link"/>
6214                         <field name="owner" reporter:datatype="link"/>
6215                         <field name="create_time" reporter:datatype="timestamp"/>
6216                         <field name="name" reporter:datatype="text"/>
6217                         <field name="shared" reporter:datatype="bool"/>
6218                         <field name="share_with" reporter:datatype="link"/>
6219                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6220                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6221                 </fields>
6222                 <links>
6223                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6224                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6225                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6226                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6227                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6228                 </links>
6229         </class>
6230         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6231                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6232                         <field name="id" reporter:datatype="id" />
6233                         <field name="owner" reporter:datatype="link"/>
6234                         <field name="create_time" reporter:datatype="timestamp"/>
6235                         <field name="name" reporter:datatype="text"/>
6236                         <field name="data" reporter:datatype="text"/>
6237                         <field name="folder" reporter:datatype="link"/>
6238                         <field name="description" reporter:datatype="text"/>
6239                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6240                 </fields>
6241                 <links>
6242                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6243                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6244                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6245                 </links>
6246         </class>
6247         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6248                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6249                         <field name="id" reporter:datatype="id" />
6250                         <field name="owner" reporter:datatype="link"/>
6251                         <field name="create_time" reporter:datatype="timestamp"/>
6252                         <field name="template" reporter:datatype="link"/>
6253                         <field name="data" reporter:datatype="link"/>
6254                         <field name="folder" reporter:datatype="link"/>
6255                         <field name="recur" reporter:datatype="bool"/>
6256                         <field name="recurrence" reporter:datatype="interval"/>
6257                         <field name="name" reporter:datatype="text"/>
6258                         <field name="description" reporter:datatype="text"/>
6259                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6260                 </fields>
6261                 <links>
6262                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6263                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6264                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6265                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6266                 </links>
6267         </class>
6268         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6269                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6270                         <field name="id" reporter:datatype="id" />
6271                         <field name="runner" reporter:datatype="link"/>
6272                         <field name="start_time" reporter:datatype="timestamp"/>
6273                         <field name="complete_time" reporter:datatype="timestamp"/>
6274                         <field name="run_time" reporter:datatype="timestamp"/>
6275                         <field name="email" reporter:datatype="text"/>
6276                         <field name="excel_format" reporter:datatype="bool"/>
6277                         <field name="csv_format" reporter:datatype="bool"/>
6278                         <field name="html_format" reporter:datatype="bool"/>
6279                         <field name="error_code" reporter:datatype="int"/>
6280                         <field name="error_text" reporter:datatype="text"/>
6281                         <field name="report" reporter:datatype="link"/>
6282                         <field name="folder" reporter:datatype="link"/>
6283                         <field name="chart_pie" reporter:datatype="bool"/>
6284                         <field name="chart_bar" reporter:datatype="bool"/>
6285                         <field name="chart_line" reporter:datatype="bool"/>
6286                 </fields>
6287                 <links>
6288                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6289                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6290                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6291                 </links>
6292         </class>
6293         <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">
6294                 <fields oils_persist:primary="id">
6295                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6296                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6297                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6298                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6299                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6300                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6301                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6302                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6303                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6304                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6305                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6306                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6307                 </fields>
6308                 <links>
6309                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6310                 </links>
6311         </class>
6312         <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">
6313                 <fields oils_persist:primary="id">
6314                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6315                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6316                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6317                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6318                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6319                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6320                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6321                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6322                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6323                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6324                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6325                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6326                 </fields>
6327                 <links>
6328                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6329                 </links>
6330         </class>
6331         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
6332                 <fields oils_persist:primary="id">
6333                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6334                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
6335                         <field reporter:label="Fingerprint" name="fingerprint" />
6336                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6337                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6338                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6339                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6340                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
6341                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6342                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6343                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6344                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
6345                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
6346                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
6347                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6348                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6349                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
6350                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
6351                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
6352                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
6353                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
6354                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
6355                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6356                 </fields>
6357                 <links>
6358                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
6359                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6360                 </links>
6361         </class>
6362         <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">
6363                 <fields oils_persist:primary="id">
6364                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
6365                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
6366                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
6367                 </fields>
6368                 <links>
6369                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
6370                 </links>
6371         </class>
6372         <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">
6373                 <fields oils_persist:primary="id">
6374                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
6375                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
6376                 </fields>
6377                 <links>
6378                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
6379                 </links>
6380         </class>
6381         <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">
6382                 <fields oils_persist:primary="id">
6383                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6384                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
6385                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
6386                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
6387                 </fields>
6388                 <links>
6389                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
6390                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
6391                 </links>
6392         </class>
6393         <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">
6394                 <fields oils_persist:primary="xact">
6395                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6396                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
6397                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
6398                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
6399                 </fields>
6400                 <links>
6401                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6402                 </links>
6403         </class>
6404         <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">
6405                 <fields oils_persist:primary="xact">
6406                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6407                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6408                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6409                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6410                 </fields>
6411                 <links>
6412                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6413                 </links>
6414         </class>
6415         <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)">
6416                 <fields oils_persist:primary="id">
6417                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6418                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6419                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6420                 </fields>
6421                 <links>
6422                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6423                 </links>
6424         </class>
6425         <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">
6426                 <fields oils_persist:primary="id">
6427                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6428                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6429                 </fields>
6430                 <links>
6431                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6432                 </links>
6433         </class>
6434         <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">
6435                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6436                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6437                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6438                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6439                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6440                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6441                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6442                 </fields>
6443                 <links>
6444                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6445                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6446                 </links>
6447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6448                         <actions>
6449                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6450                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6451                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6452                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6453                         </actions>
6454                 </permacrud>
6455         </class>
6456         <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">
6457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
6458                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
6459                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
6460                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
6461                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
6462                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6463                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6464                 </fields>
6465                 <links>
6466                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6467                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6468                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6469                 </links>
6470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6471                         <actions>
6472                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
6473                                         <context link="formula" field="owner"/>
6474                                 </create>
6475                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
6476                                         <context link="formula" field="owner"/>
6477                                 </retrieve>
6478                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
6479                                         <context link="formula" field="owner"/>
6480                                 </update>
6481                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
6482                                         <context link="formula" field="owner"/>
6483                                 </delete>
6484                         </actions>
6485                 </permacrud>
6486         </class>
6487
6488         <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">
6489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
6490                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6491                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6492                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6493                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
6494                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
6495                 </fields>
6496                 <links>
6497                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6498                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
6499                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6500                 </links>
6501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6502                         <actions>
6503                                 <create permission="CREATE_PURCHASE_ORDER">
6504                                         <context link="formula" field="owner"/>
6505                 </create>
6506                                 <retrieve permission="CREATE_PURCHASE_ORDER">
6507                                         <context link="formula" field="owner"/>
6508                 </retrieve>
6509                                 <update permission="CREATE_PURCHASE_ORDER">
6510                                         <context link="formula" field="owner"/>
6511                 </update>
6512                                 <delete permission="CREATE_PURCHASE_ORDER">
6513                                         <context link="formula" field="owner"/>
6514                 </delete>
6515                         </actions>
6516                 </permacrud>
6517         </class>
6518
6519         <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">
6520                 <fields oils_persist:primary="id">
6521                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
6522                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6523                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
6524                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
6525                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
6526                 </fields>
6527                 <links>
6528                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6529                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6530                 </links>
6531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6532                 </permacrud>
6533         </class>
6534
6535         <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">
6536                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
6537                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6538                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6539                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6540                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6541                 </fields>
6542                 <links>
6543                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6544                 </links>
6545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6546                         <actions>
6547                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6548                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6549                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6550                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
6551                         </actions>
6552                 </permacrud>
6553         </class>
6554
6555         <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">
6556                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
6557                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
6558                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6559                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6560                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6561                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
6562                 </fields>
6563                 <links>
6564                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6565                 </links>
6566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6567                         <actions>
6568                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6569                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
6570                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6571                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
6572                         </actions>
6573                 </permacrud>
6574         </class>
6575
6576         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
6577                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
6578                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
6579                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
6580                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
6581                 </fields>
6582                 <links>
6583                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
6584                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
6585                 </links>
6586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6587                 </permacrud>
6588         </class>
6589
6590         <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">
6591                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
6592                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
6593                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
6594                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
6595                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
6596                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6597                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6598                 </fields>
6599                 <links>
6600                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
6601                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
6602                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6603                 </links>
6604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6605                 </permacrud>
6606         </class>
6607
6608         <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">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
6610                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6611                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
6612                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
6613                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6614                 </fields>
6615                 <links>
6616                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6617                 </links>
6618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6619             <actions>
6620                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6621                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
6622                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6623                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
6624             </actions>
6625                 </permacrud>
6626         </class>
6627
6628         <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">
6629                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
6630                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
6631                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
6632                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
6633                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
6634                 </fields>
6635                 <links>
6636                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6637                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
6638                 </links>
6639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6640                         <actions>
6641                                 <create permission="ADMIN_CLAIM_POLICY">
6642                                         <context link="claim_policy" field="org_unit"/>
6643                 </create>
6644                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
6645                                         <context link="claim_policy" field="org_unit"/>
6646                 </retrieve>
6647                                 <update permission="ADMIN_CLAIM_POLICY">
6648                                         <context link="claim_policy" field="org_unit"/>
6649                 </update>
6650                                 <delete permission="ADMIN_CLAIM_POLICY">
6651                                         <context link="claim_policy" field="org_unit"/>
6652                 </delete>
6653                         </actions>
6654                 </permacrud>
6655         </class>
6656
6657     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
6658         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
6659             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6660             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6661             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6662             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
6663             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6664             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
6665             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
6666             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
6667             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
6668             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
6669             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
6670             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
6671             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
6672             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
6673             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6674         </fields>
6675     </class>
6676
6677     <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">
6678         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
6679             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6680             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6681             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6682             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6683             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6684         </fields>
6685     </class>
6686
6687     <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">
6688         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
6689             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6690             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6691             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6692             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6693             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6694             <field reporter:label="City" name="city" reporter:datatype="text"/>
6695             <field reporter:label="State" name="state" reporter:datatype="text"/>
6696             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6697             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6698             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6699         </fields>
6700     </class>
6701
6702     <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">
6703         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
6704             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6705             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6706             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6707             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
6708             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
6709             <field reporter:label="City" name="city" reporter:datatype="text"/>
6710             <field reporter:label="State" name="state" reporter:datatype="text"/>
6711             <field reporter:label="Country" name="country" reporter:datatype="text"/>
6712             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6713             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6714         </fields>
6715     </class>
6716
6717     <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">
6718         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
6719             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
6720             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
6721             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
6722             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
6723             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
6724             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
6725         </fields>
6726     </class>
6727
6728         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
6729                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
6730                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
6731                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6732                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6733                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6734                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
6735                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
6736                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
6737                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
6738                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
6739                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
6740                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
6741                 </fields>
6742                 <links>
6743                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6744                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6745                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
6746                 </links>
6747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6748                 </permacrud>
6749         </class>
6750
6751         <class id="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">
6752                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
6753                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
6754                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
6755                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
6756                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
6757                 </fields>
6758                 <links>
6759                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
6760                 </links>
6761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6762                 </permacrud>
6763         </class>
6764
6765     <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">
6766         <fields>
6767             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6768             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6769             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6770         </fields>
6771                 <links>
6772                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6773                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6774                 </links>
6775     </class>
6776
6777     <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">
6778         <fields>
6779             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6780             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
6781         </fields>
6782                 <links>
6783                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6784                 </links>
6785     </class>
6786
6787     <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">
6788         <fields>
6789             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6790             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6791             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6792         </fields>
6793                 <links>
6794                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6795                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6796                 </links>
6797     </class>
6798
6799     <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">
6800         <fields>
6801             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6802             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
6803         </fields>
6804                 <links>
6805                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6806                 </links>
6807     </class>
6808
6809     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
6810                 <oils_persist:source_definition>
6811
6812             SELECT  DISTINCT l.*
6813               FROM  action.unfulfilled_hold_loops l
6814                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
6815               WHERE l.count = m.max
6816
6817                 </oils_persist:source_definition>
6818         <fields>
6819             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6820             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
6821             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
6822         </fields>
6823                 <links>
6824                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6825                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6826                 </links>
6827     </class>
6828
6829         <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">
6830                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
6831                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
6832                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
6833                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
6834                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
6835                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
6836                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
6837                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
6838                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
6839                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
6840                 </fields>
6841                 <links>
6842                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
6843                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
6844                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
6845                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
6846                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
6847                 </links>
6848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6849                 </permacrud>
6850         </class>
6851
6852         <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">
6853                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
6854                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
6855                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
6856                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6857                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
6858                 </fields>
6859                 <links>
6860                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
6861                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
6862                 </links>
6863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6864                 </permacrud>
6865         </class>
6866
6867         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
6868                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
6869                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
6870                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
6871                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
6872                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
6873                 </fields>
6874                 <links>
6875                 </links>
6876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6877                 </permacrud>
6878         </class>
6879
6880         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
6881                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
6882                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
6883                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
6884                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6885                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
6886                 </fields>
6887                 <links>
6888                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
6889                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
6890                 </links>
6891                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6892                 </permacrud>
6893         </class>
6894         
6895         <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">
6896                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
6897                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
6898                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
6899                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
6900                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
6901                 </fields>
6902                 <links>
6903                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
6904                 </links>
6905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6906                 </permacrud>
6907         </class>
6908         
6909         <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">
6910                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
6911                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
6912                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6913                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6914                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
6915                 </fields>
6916                 <links>
6917                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6918                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
6919                 </links>
6920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6921                 </permacrud>
6922         </class>
6923
6924         <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">
6925                 <fields oils_persist:primary="name">
6926                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
6927                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6928                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
6929                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6930                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
6931                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
6932                 </fields>
6933                 <links>
6934                 </links>
6935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6936                 </permacrud>
6937         </class>
6938
6939         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6941                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6942                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
6943                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6944                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6945                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6946                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6947                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6948                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
6949                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6950                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6951                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6952                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
6953                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6954                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
6955                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
6956                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
6957                 </fields>
6958                 <links>
6959                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6960                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
6961                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
6962                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
6963                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
6964                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
6965                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
6966                 </links>
6967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6968                 </permacrud>
6969         </class>
6970
6971         <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">
6972                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
6973                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
6974                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6975                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6976                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
6977                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
6978                 </fields>
6979                 <links>
6980                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
6981                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
6982                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
6983                 </links>
6984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6985                 </permacrud>
6986         </class>
6987
6988         <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">
6989                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
6990                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
6991                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
6992                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
6993                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
6994                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
6995                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
6996                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
6997                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
6998                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6999                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7000                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7001                 </fields>
7002                 <links>
7003                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7004                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7005                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7006                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7007                 </links>
7008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7009                 </permacrud>
7010         </class>
7011
7012         <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">
7013                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
7014                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7015                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7016                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7017                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7018                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7019                 </fields>
7020                 <links>
7021                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7022                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7023                 </links>
7024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7025                 </permacrud>
7026         </class>
7027
7028         <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">
7029                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
7030                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7031                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7032                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7033                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7034                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7035                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7036                 </fields>
7037                 <links>
7038                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7039                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7040                 </links>
7041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7042                 </permacrud>
7043         </class>
7044
7045         <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">
7046                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
7047                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7048                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7049                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7050                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7051                 </fields>
7052                 <links>
7053                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7054                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7055                 </links>
7056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7057                 </permacrud>
7058         </class>
7059
7060         <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">
7061                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7062                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7063                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7064                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7065                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7066                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7067                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7068                 </fields>
7069                 <links>
7070                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7071                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7072                 </links>
7073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7074                 </permacrud>
7075         </class>
7076
7077         <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">
7078                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7079                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7080                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7081                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7082                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7083                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7084                 </fields>
7085                 <links>
7086                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7087                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7088                 </links>
7089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7090                 </permacrud>
7091         </class>
7092
7093         <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">
7094                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7095                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7096                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
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="Literal" name="literal" reporter:datatype="text"/>
7100                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7101                 </fields>
7102                 <links>
7103                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7104                 </links>
7105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7106                 </permacrud>
7107         </class>
7108
7109         <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">
7110                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7111                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7112                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7113                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7115                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7116                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7117                 </fields>
7118                 <links>
7119                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7120                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7121                 </links>
7122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7123                 </permacrud>
7124         </class>
7125
7126         <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">
7127                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7128                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7129                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7130                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7131                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7132                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7133                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7134                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7135                 </fields>
7136                 <links>
7137                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7138                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7139                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7140                 </links>
7141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7142                 </permacrud>
7143         </class>
7144
7145         <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">
7146                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7147                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7148                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7149                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7150                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7151                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7152                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7153                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7154                 </fields>
7155                 <links>
7156                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7157                 </links>
7158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7159                 </permacrud>
7160         </class>
7161
7162         <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">
7163                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7164                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7165                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7166                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7167                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7168                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7169                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7170                 </fields>
7171                 <links>
7172                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7173                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7174                 </links>
7175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7176                 </permacrud>
7177         </class>
7178
7179         <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">
7180                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7181                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7182                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7183                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7184                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7185                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7186                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7187                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7188                 </fields>
7189                 <links>
7190                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7191                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7192                 </links>
7193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7194                 </permacrud>
7195         </class>
7196
7197         <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">
7198                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7199                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7200                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7201                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7202                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7203                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7204                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7205                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7206                 </fields>
7207                 <links>
7208                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7209                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7210                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7211                 </links>
7212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7213                 </permacrud>
7214         </class>
7215
7216         <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">
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="Left Operand" name="left_operand" reporter:datatype="link"/>
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                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7228                 </links>
7229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7230                 </permacrud>
7231         </class>
7232
7233         <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">
7234                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7235                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7236                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7237                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7238                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
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                 </links>
7244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7245                 </permacrud>
7246         </class>
7247
7248         <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">
7249                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7250                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7251                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7252                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7253                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7254                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7255                 </fields>
7256                 <links>
7257                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7258                 </links>
7259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7260                 </permacrud>
7261         </class>
7262
7263         <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">
7264                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7265                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7266                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7267                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7268                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7269                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7270                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7271                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7272                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7273                 </fields>
7274                 <links>
7275                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7276                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7277                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7278                 </links>
7279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7280                 </permacrud>
7281         </class>
7282
7283         <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">
7284                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7285                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7286                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7287                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7288                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7289                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7290                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7291                 </fields>
7292                 <links>
7293                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7294                 </links>
7295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7296                 </permacrud>
7297         </class>
7298
7299         <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">
7300                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7301                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7302                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7303                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7304                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7305                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7306                 </fields>
7307                 <links>
7308                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7309                 </links>
7310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7311                 </permacrud>
7312         </class>
7313
7314         <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">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
7316                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7317                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7318                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7319                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7320                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7321                 </fields>
7322                 <links>
7323                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7324                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7325                 </links>
7326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7327                 </permacrud>
7328         </class>
7329
7330         <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">
7331                 <fields oils_persist:primary="id">
7332                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
7333                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
7334                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
7335                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
7336                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
7337                 </fields>
7338                 <links>
7339                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
7340                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7341                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
7342                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7343                 </links>
7344         </class>
7345
7346         <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">
7347                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
7348                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7349                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
7350                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
7351                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
7352                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7353                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7354                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
7355                 </fields>
7356                 <links/>
7357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7358                         <actions>
7359                                 <retrieve/>
7360                         </actions>
7361                 </permacrud>
7362         </class>
7363
7364         <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">
7365                 <fields oils_persist:primary="ptype_key">
7366                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
7367                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7368                 </fields>
7369                 <links/>
7370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7371                         <actions>
7372                                 <retrieve/>
7373                         </actions>
7374                 </permacrud>
7375         </class>
7376
7377         <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">
7378                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
7379                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7380                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
7381                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
7382                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7383                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7384                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7385                 </fields>
7386                 <links>
7387                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
7388                 </links>
7389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7390                         <actions>
7391                                 <retrieve/>
7392                         </actions>
7393                 </permacrud>
7394         </class>
7395
7396         <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">
7397                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
7398                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7399                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
7400                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
7401                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7402                 </fields>
7403                 <links>
7404                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7405                 </links>
7406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7407                         <actions>
7408                                 <retrieve/>
7409                         </actions>
7410                 </permacrud>
7411         </class>
7412
7413         <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">
7414                 <fields oils_persist:primary="code">
7415                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
7416                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
7417                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
7418                 </fields>
7419                 <links/>
7420                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7421                         <actions>
7422                                 <retrieve/>
7423                         </actions>
7424                 </permacrud>
7425         </class>
7426
7427         <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">
7428                 <oils_persist:source_definition>
7429
7430             SELECT  b.id,
7431                     MAX(dcp.edit_date) AS last_delete_date
7432              FROM   biblio.record_entry b
7433                     JOIN asset.call_number cn ON (cn.record = b.id)
7434                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
7435              WHERE  NOT b.deleted
7436              GROUP BY b.id
7437              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
7438
7439                 </oils_persist:source_definition>
7440                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7441                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7442                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
7443                 </fields>
7444                 <links>
7445                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7446                 </links>
7447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7448                         <actions>
7449                                 <retrieve/>
7450                         </actions>
7451                 </permacrud>
7452         </class>
7453
7454         <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">
7455                 <oils_persist:source_definition>
7456
7457             -- -- 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.
7458             -- -- 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
7459             -- -- may not.
7460             -- SELECT
7461             --     bre.id AS "bib_id",
7462             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
7463             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
7464             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
7465             -- FROM (
7466                 SELECT
7467                     y.bre AS "id",
7468                     COALESCE( x.copy_count, 0 ) AS "copy_count",
7469                     y.hold_count AS "hold_count",
7470                     (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"
7471                 FROM (
7472                         SELECT
7473                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
7474                             COUNT(*) AS "hold_count"
7475                         FROM action.hold_request h
7476                         WHERE
7477                             cancel_time IS NULL
7478                             AND fulfillment_time IS NULL
7479                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
7480                         GROUP BY 1
7481                     )y LEFT JOIN (
7482                         SELECT 
7483                             (SELECT id
7484                                 FROM biblio.record_entry 
7485                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
7486                             ) AS "bre", 
7487                             COUNT(*) AS "copy_count"
7488                         FROM asset.copy
7489                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
7490                         WHERE copy.holdable 
7491                             AND NOT copy.deleted 
7492                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
7493                         GROUP BY 1
7494                     )x ON x.bre = y.bre
7495                 -- )z RIGHT JOIN (
7496                 --     SELECT id
7497                 --     FROM biblio.record_entry
7498                 --     WHERE NOT deleted
7499                 -- )bre ON (z.bib_id = bre.id)
7500                 
7501
7502                 </oils_persist:source_definition>
7503                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
7504                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
7505                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
7506                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
7507                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
7508                 </fields>
7509                 <links>
7510                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
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         <!-- ********************************************************************************************************************* -->
7520         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
7521         <!-- ********************************************************************************************************************* -->
7522         <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">
7523                 <fields oils_persist:primary="id">
7524                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
7525                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
7526                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
7527                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7528                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
7529                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
7530                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7531                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
7532                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
7533                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
7534                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
7535                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
7536                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
7537                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
7538                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7539                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
7540                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
7541                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
7542                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
7543                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
7544                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
7545                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
7546                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
7547                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
7548                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
7549                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
7550                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
7551                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
7552                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
7553                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7554                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7555                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7556                 </fields>
7557                 <links>
7558                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7559                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
7560                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
7561                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
7562                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7563                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
7564                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
7565                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
7566                 </links>
7567         </class>
7568
7569         <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">
7570                 <fields oils_persist:primary="id">
7571                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7572                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7573                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7574                 </fields>
7575                 <links>
7576                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7577                 </links>
7578         </class>
7579
7580         <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">
7581                 <fields oils_persist:primary="id">
7582                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
7583                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7584                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7585                 </fields>
7586                 <links>
7587                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7588                 </links>
7589         </class>
7590
7591         <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">
7592                 <fields oils_persist:primary="id">
7593                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7594
7595                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
7596                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
7597                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
7598
7599                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
7600                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
7601                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
7602
7603                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
7604                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
7605
7606                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7607                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7608                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
7609
7610                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
7611                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
7612
7613                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
7614                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
7615                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
7616
7617                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
7618                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
7619                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
7620
7621                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
7622                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
7623                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
7624                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
7625
7626                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
7627                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
7628
7629                 </fields>
7630                 <links>
7631                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
7632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7633                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7634                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7635                 </links>
7636         </class>
7637
7638         <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">
7639                 <oils_persist:source_definition>
7640
7641             SELECT
7642                 po.ordering_agency AS ordering_agency,
7643                 po.id AS purchase_order,
7644                 li.id AS lineitem,
7645                 lid.id AS lineitem_detail,
7646                 cpa.id AS claim_policy_action
7647             FROM
7648                 acq.lineitem_detail lid
7649                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
7650                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
7651                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
7652                 JOIN acq.claim_policy_action cpa ON (
7653                     cpa.claim_policy = cp.id
7654
7655                     -- we only care about claim policy actions whose claim
7656                     -- interval we'd reached or exceeded
7657                     AND (NOW() - cpa.action_interval) &gt; po.order_date
7658
7659                     -- filter out all claim policy actions where claim events
7660                     -- have occurred on or after the action's action_interval
7661                     AND NOT EXISTS (
7662                         SELECT 1
7663                         FROM
7664                             acq.claim_event evt
7665                             JOIN acq.claim claim ON (
7666                                 claim.id = evt.claim
7667                                 AND claim.lineitem_detail = lid.id
7668                             )
7669                         WHERE
7670                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
7671                     )
7672                 )
7673             WHERE
7674                 lid.cancel_reason IS NULL
7675                 AND li.cancel_reason IS NULL -- belt/suspenders
7676                 AND po.cancel_reason IS NULL -- belt/suspenders
7677                 AND lid.recv_time IS NULL
7678                 AND po.state = 'on-order'
7679             ORDER BY 1, 2, 3, 4, 5
7680
7681                 </oils_persist:source_definition>
7682                 <fields>
7683                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7684                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7685                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7686                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7687                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
7688                 </fields>
7689                 <links>
7690                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7691                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7692                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7693                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7694                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
7695                 </links>
7696         </class>
7697
7698         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
7699                 <oils_persist:source_definition>
7700
7701             SELECT 
7702                 li.id AS lineitem, 
7703                 (
7704                     SELECT COUNT(lid.id) 
7705                     FROM acq.lineitem_detail lid
7706                     WHERE lineitem = li.id
7707                 ) AS item_count,
7708                 (
7709                     SELECT COUNT(lid.id) 
7710                     FROM acq.lineitem_detail lid
7711                     WHERE recv_time IS NOT NULL AND lineitem = li.id
7712                 ) AS recv_count,
7713                 (
7714                     SELECT COUNT(lid.id) 
7715                     FROM acq.lineitem_detail lid
7716                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
7717                 ) AS cancel_count,
7718                 (
7719                     SELECT COUNT(lid.id) 
7720                     FROM acq.lineitem_detail lid
7721                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7722                     WHERE NOT debit.encumbrance AND lineitem = li.id
7723                 ) AS invoice_count,
7724                 (
7725                     SELECT COUNT(DISTINCT(lid.id)) 
7726                     FROM acq.lineitem_detail lid
7727                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
7728                     WHERE lineitem = li.id
7729                 ) AS claim_count,
7730                 (
7731                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
7732                     FROM acq.lineitem_detail lid
7733                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
7734                 ) AS estimated_amount,
7735                 (
7736                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7737                     FROM acq.lineitem_detail lid
7738                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7739                     WHERE debit.encumbrance AND lineitem = li.id
7740                 ) AS encumbrance_amount,
7741                 (
7742                     SELECT SUM(debit.amount)::NUMERIC(8,2)
7743                     FROM acq.lineitem_detail lid
7744                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
7745                     WHERE NOT debit.encumbrance AND lineitem = li.id
7746                 ) AS paid_amount
7747
7748                 FROM acq.lineitem AS li
7749         </oils_persist:source_definition>
7750                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
7751                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7752                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7753                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
7754                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
7755                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
7756                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
7757                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
7758                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
7759                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
7760                 </fields>
7761                 <links>
7762                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7763                 </links>
7764     </class>
7765
7766
7767         <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">
7768                 <oils_persist:source_definition>
7769
7770                         SELECT  t.*
7771                           FROM  action.transit_copy t
7772                                 JOIN actor.org_unit AS s ON (t.source = s.id)
7773                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
7774                           WHERE s.parent_ou &lt;&gt; d.parent_ou
7775
7776                 </oils_persist:source_definition>
7777                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7778                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
7779                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
7780                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7781                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
7782                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
7783                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
7784                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
7785                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7786                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7787                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7788                 </fields>
7789                 <links>
7790                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
7791                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7792                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7793                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7794                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7795                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
7796                 </links>
7797         </class>
7798
7799     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
7800                 <oils_persist:source_definition>
7801
7802         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
7803                 SELECT
7804                         cp.id as copy,
7805                         COUNT(circ.id),
7806                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7807                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7808                 FROM
7809                         asset.copy cp
7810                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
7811                 GROUP BY 1, 3, 4
7812                 UNION
7813                 SELECT
7814                         cp.id as copy,
7815                         COUNT(circ.id),
7816                         EXTRACT(YEAR FROM circ.xact_start) AS year,
7817                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
7818                 FROM
7819                         asset.copy cp
7820                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
7821                 GROUP BY 1, 3, 4
7822                 UNION
7823                 SELECT
7824                         id as copy,
7825                         circ_count,
7826                         -1 AS year,
7827                         false as is_renewal
7828                 FROM
7829                         extend_reporter.legacy_circ_count
7830         )x GROUP BY 1, 3, 4
7831
7832                 </oils_persist:source_definition>
7833         <fields>
7834             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
7835             <field reporter:label="Count" name="count" reporter:datatype="int"/>
7836             <field reporter:label="Year" name="year" reporter:datatype="int"/>
7837             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
7838         </fields>
7839                 <links>
7840                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7841                 </links>
7842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7843                         <actions>
7844                                 <retrieve/>
7845                         </actions>
7846                 </permacrud>
7847     </class>
7848
7849         <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">
7850                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7851                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
7852                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
7853                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
7854                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7855                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
7856                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
7857                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
7858                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
7859                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
7860                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
7861                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
7862                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
7863                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
7864                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
7865                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
7866                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
7867                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
7868                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
7869                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
7870                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
7871                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
7872                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
7873                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
7874                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
7875                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7876                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7877                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7878                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
7879                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
7880                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
7881                 </fields>
7882                 <links>
7883                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7884                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
7885                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
7886                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7887                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
7888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7889                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7890                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7891                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7892                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7893                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7894                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7895                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
7896                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7897                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7898                 </links>
7899         </class>
7900
7901     <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">
7902         <fields oils_persist:primary="id">
7903             <field reporter:label="Title" name="title" reporter:datatype="text"/>
7904             <field reporter:label="Author" name="author" reporter:datatype="text"/>
7905             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
7906             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7907             <field reporter:label="Price" name="price" reporter:datatype="money"/>
7908             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7909             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
7910             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
7911             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
7912             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
7913             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
7914             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
7915             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
7916             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
7917             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
7918             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
7919             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7920             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7921             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
7922             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
7923             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
7924             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
7925             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7926             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
7927             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7928             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
7929             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
7930             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
7931             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
7932             <field reporter:label="Status" name="status" reporter:datatype="link"/>
7933             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
7934             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
7935             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
7936             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
7937         </fields>
7938         <links>
7939             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7940             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7941             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7942             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7943             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7944         </links>
7945     </class>
7946
7947     <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">
7948         <fields oils_persist:primary="id">
7949             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7950             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7951             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7952             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7953         </fields>
7954         <links>
7955             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7956             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7957         </links>
7958     </class>
7959
7960     <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">
7961         <fields oils_persist:primary="owning_lib">
7962             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7963             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7964             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7965         </fields>
7966         <links>
7967             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7968         </links>
7969     </class>
7970
7971     <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">
7972         <fields oils_persist:primary="id">
7973             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
7974             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7975             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7976             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
7977             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
7978         </fields>
7979         <links>
7980             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
7981             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7982             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7983         </links>
7984     </class>
7985
7986     <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">
7987         <fields oils_persist:primary="circ_lib">
7988             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
7989             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7990             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
7991             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
7992         </fields>
7993         <links>
7994             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7995             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7996         </links>
7997     </class>
7998
7999     <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">
8000         <fields oils_persist:primary="id">
8001             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8002             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8003             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8004             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8005             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8006         </fields>
8007         <links>
8008             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8009             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8010             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8011         </links>
8012     </class>
8013
8014     <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">
8015         <fields oils_persist:primary="home_ou">
8016             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8017             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8018             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8019             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8020         </fields>
8021         <links>
8022             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8023             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8024         </links>
8025     </class>
8026         <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">
8027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8028                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8029                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8030                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8031                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8032                 </fields>
8033                 <links>
8034                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8035                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8036                 </links>
8037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8038                         <actions>
8039                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8040                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8041                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8042                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8043                         </actions>
8044                 </permacrud>
8045         </class>
8046         <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">
8047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8048                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8049                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8050                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8051                 </fields>
8052                 <links>
8053                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8054                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8055                         </links>
8056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8057                 <actions>
8058                                 <create permission="ADMIN_ACQ_FUND_TAG">
8059                                         <context link="tag" field="owner"/>
8060                                 </create>
8061                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8062                                         <context link="tag" field="owner"/>
8063                                 </retrieve>
8064                                 <update permission="ADMIN_ACQ_FUND_TAG">
8065                                         <context link="tag" field="owner"/>
8066                                 </update>
8067                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8068                                         <context link="tag" field="owner"/>
8069                                 </delete>
8070                         </actions>
8071                 </permacrud>
8072         </class>
8073
8074         <!-- ********************************************************************************************************************* -->
8075
8076 </IDL>
8077
8078 <!--
8079     vim:noet:ts=4:sw=4:
8080 -->