]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Add a "staff_alert" column to config.standing_penalty, and ...
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <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">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <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">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                 </fields>
214                 <links>
215                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
216                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
217                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
218                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
219                 </links>
220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
221                         <actions>
222                                 <create permission="CREATE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </create>
225                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </retrieve>
228                                 <update permission="UPDATE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </update>
231                                 <delete permission="DELETE_IMPORT_ITEM">
232                     <context link="definition" field="owner"/>
233                                 </delete>
234                         </actions>
235                 </permacrud>
236         </class>
237
238         <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">
239                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
240                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
241                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
243                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
244                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
245                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
246                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
263                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
264                 </fields>
265                 <links>
266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
267                 </links>
268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
269                         <actions>
270                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
272                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
274                         </actions>
275                 </permacrud>
276         </class>
277
278         <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">
279                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
280                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
282                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
283                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
284                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
285                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
286                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
287                 </fields>
288                 <links>
289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
290                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
291                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
292                 </links>
293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
294                         <actions>
295                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
296                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
297                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                         </actions>
300                 </permacrud>
301         </class>
302
303         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
304                 <fields oils_persist:primary="code">
305                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
307                 </fields>
308                 <links>
309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
310                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
311                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <retrieve/>
316                         </actions>
317                 </permacrud>
318         </class>
319
320         <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">
321                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
322                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
323                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
324                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
325                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
326                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
327                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
328                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
329                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
330                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
331                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
332                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
333                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
334                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
336                 </fields>
337                 <links>
338                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
339                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
340                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
341                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
342             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
343             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
344             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
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="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">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
360                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
361                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
362                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
363                 </fields>
364                 <links/>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
368                 <retrieve/>
369                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
370                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
371                         </actions>
372                 </permacrud>
373         </class>
374
375         <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">
376                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
377                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
379                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
380                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
381                 </fields>
382                 <links>
383                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
384                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
385                 </links>
386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
387                         <actions>
388                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                         </actions>
393                 </permacrud>
394         </class>
395
396         <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">
397                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
398                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
399                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
400                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
401                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
402                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
403                 </fields>
404                 <links>
405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
406                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
407                 </links>
408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
409                         <actions>
410                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
411                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
412                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <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">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
420                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
424                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
425                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
426                 </fields>
427                 <links>
428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
429                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
430                 </links>
431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
432                         <actions>
433                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                         </actions>
438                 </permacrud>
439         </class>
440
441         <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">
442                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
443                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
444                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
445                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
446                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
447                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
448                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
449                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
450                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
451                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
452                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
453                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
454                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
455                 </fields>
456                 <links>
457                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
458                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
459                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
460             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
461             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
462                 </links>
463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
464                         <actions>
465                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                         </actions>
470                 </permacrud>
471         </class>
472
473         <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">
474                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
478                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
479                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
480                 </fields>
481                 <links/>
482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
483                         <actions>
484                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                 <retrieve/>
486                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
488                         </actions>
489                 </permacrud>
490         </class>
491
492         <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">
493                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
494                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
497                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
498                 </fields>
499                 <links>
500                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
501                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
502                 </links>
503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
504                         <actions>
505                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
507                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                         </actions>
510                 </permacrud>
511         </class>
512
513         <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">
514                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
515                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
516                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
517                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
522                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
523                 </links>
524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525                         <actions>
526                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                         </actions>
531                 </permacrud>
532         </class>
533
534         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
535                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
536                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
538                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
539                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
540                 </fields>
541                 <links>
542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
543                 </links>
544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
545                         <actions>
546                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
550                         </actions>
551                 </permacrud>
552         </class>
553
554         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
555                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
556                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
557                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
558                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
559                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
560                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
561                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
562                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
563             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
564                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
565                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
566                 </fields>
567                 <links>
568                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
569                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
570                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
571                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </create>
578                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </retrieve>
581                                 <update permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </update>
584                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
585                     <context link="match_set" field="owner"/>
586                                 </delete>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
592                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
593                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
594                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
595                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
596                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
599                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
600                 </fields>
601                 <links>
602                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
603                 </links>
604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
605                         <actions>
606                                 <create permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </create>
609                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </retrieve>
612                                 <update permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </update>
615                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
616                     <context link="match_set" field="owner"/>
617                                 </delete>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
624                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
626                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
628                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
629                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
630                 </fields>
631                 <links>
632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
635                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
636                 </links>
637         </class>
638
639     <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">
640         <fields oils_persist:primary="name">
641             <field reporter:label="Name" name="name" reporter:datatype="text"/>
642             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
643             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
644             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
645         </fields>
646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647             <actions>
648                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652             </actions>
653         </permacrud>
654     </class>
655
656     <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">
657         <fields oils_persist:primary="id">
658             <field reporter:label="ID" name="id" reporter:datatype="id"/>
659             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
661             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
662             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
663         </fields>
664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665             <actions>
666                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <retrieve/>
668                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
670             </actions>
671         </permacrud>
672     </class>
673
674         <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">
675                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
676                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
678                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
679                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
680                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
681                 </fields>
682                 <links>
683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
684                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689                 <retrieve/>
690                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
692             </actions>
693         </permacrud>
694         </class>
695
696         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
697                 <fields oils_persist:primary="name">
698                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
699                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
700                         <field reporter:label="Description" name="description" reporter:datatype="text" />
701                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
702                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
703                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
704                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
705                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
707                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
708                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
709                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
710                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
711                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
712                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
713                 </fields>
714                 <links>
715                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
716                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
717                 </links>
718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
719             <actions>
720                 <create permission="ADMIN_SVF" global_required="true"/>
721                 <retrieve/>
722                 <update permission="ADMIN_SVF" global_required="true"/>
723                 <delete permission="ADMIN_SVF" global_required="true"/>
724             </actions>
725         </permacrud>
726         </class>
727
728         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
729                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
731                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
732                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
733             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
734                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
735                 </fields>
736                 <links/>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
740                 <retrieve/>
741                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
742                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
743             </actions>
744         </permacrud>
745         </class>
746
747         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
748                 <fields oils_persist:primary="id">
749                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
750                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
751                 </fields>
752                 <links>
753                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <retrieve/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
785                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
786                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
787                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
788                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
789                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
790                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
791                 </fields>
792                 <links>
793                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
794                 </links>
795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
796             <actions>
797                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
798                 <retrieve/>
799                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
800                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
801             </actions>
802         </permacrud>
803         </class>
804
805         <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">
806                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
807                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
808                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
809                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
810                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
811                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
812                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
813                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
814                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
815                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
816                 </fields>
817                 <links>
818                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
819                 </links>
820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
821             <actions>
822                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
823                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
824                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
825                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
826             </actions>
827         </permacrud>
828         </class>
829
830     <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">
831         <fields oils_persist:primary="name">
832             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
833             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
834             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
835             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
836             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
837             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
838             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
839             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
840             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
841             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
842         </fields>
843         <links>
844             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
845             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
846         </links>
847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
848             <actions>
849                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
850                 <retrieve/>
851                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
852                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
853             </actions>
854         </permacrud>
855     </class>
856
857     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
858         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
859             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
860             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
861             <field reporter:label="Name" name="name" reporter:datatype="text"/>
862             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
863             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
864             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
865             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
866         </fields>
867         <links>
868             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
869         </links>
870     </class>
871
872         <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">
873                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
874                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
875                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
876                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
877                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
878                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
879                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
880                 </fields>
881                 <links>
882             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
883             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
884                 </links>
885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
886                         <actions>
887                                 <retrieve/>
888                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
889                         </actions>
890                 </permacrud>
891         </class>
892
893         <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">
894                 <fields oils_persist:primary="key">
895                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
896                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
897                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
898                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
899                 </fields>
900                 <links/>
901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
902                         <actions>
903                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
904                                 <retrieve/>
905                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
906                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
907                         </actions>
908                 </permacrud>
909         </class>
910
911         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
912                 <fields oils_persist:primary="module">
913                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
914                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
915                 </fields>
916                 <links/>
917         </class>
918
919         <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">
920                 <fields oils_persist:primary="module">
921                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
922                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
923                 </fields>
924                 <links/>
925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
926                         <actions>
927                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
928                                 <retrieve/>
929                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
930                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
931                         </actions>
932                 </permacrud>
933         </class>
934
935         <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">
936                 <fields oils_persist:primary="module">
937                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
939                 </fields>
940                 <links/>
941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
942                         <actions>
943                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
944                                 <retrieve/>
945                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
946                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
947                         </actions>
948                 </permacrud>
949         </class>
950
951         <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">
952                 <fields oils_persist:primary="module">
953                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
954                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
955                 </fields>
956                 <links/>
957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
958                         <actions>
959                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
960                                 <retrieve/>
961                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
962                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
963                         </actions>
964                 </permacrud>
965         </class>
966
967         <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">
968                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
969                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
970                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
971                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
972                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
973                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
974                 </fields>
975                 <links>
976                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
977                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
978                 </links>
979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
980                         <actions>
981                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
982                     <context link="event_def" field="owner"/>
983                 </create>
984                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
985                     <context link="event_def" field="owner"/>
986                 </retrieve>
987                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
988                     <context link="event_def" field="owner"/>
989                 </update>
990                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
991                     <context link="event_def" field="owner"/>
992                 </delete>
993                         </actions>
994                 </permacrud>
995         </class>
996
997         <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">
998                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
999                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1000                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1001                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1002                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1003                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1004                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1005                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1006                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1007                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1008                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1009                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1010                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1011                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1012                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1013                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1014                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1015                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1016                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1017                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1018                 </fields>
1019                 <links>
1020                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1021                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1022                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1023                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1024                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1025                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1026                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1027                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1028                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1029                 </links>
1030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1031                         <actions>
1032                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1033                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1034                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1035                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1036                         </actions>
1037                 </permacrud>
1038         </class>
1039
1040         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1041                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1042                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1043                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1044                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1045                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1046                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1047                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1048                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1049                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1050                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1051                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1052                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1053                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1054                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1055                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1056                 </fields>
1057                 <links>
1058                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1059                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1060                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1061                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1062                 </links>
1063         </class>
1064
1065         <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">
1066                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1067                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1068                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1069                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1070                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1071                 </fields>
1072                 <links>
1073                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1074                 </links>
1075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1076                         <actions>
1077                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1078                     <context link="event_def" field="owner"/>
1079                 </create>
1080                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1081                     <context link="event_def" field="owner"/>
1082                 </retrieve>
1083                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1084                     <context link="event_def" field="owner"/>
1085                 </update>
1086                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1087                     <context link="event_def" field="owner"/>
1088                 </delete>
1089                         </actions>
1090                 </permacrud>
1091         </class>
1092
1093         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1094                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1095                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1096                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1097                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1098                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1099                 </fields>
1100                 <links>
1101                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1102                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1103                 </links>
1104         </class>
1105
1106         <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">
1107                 <fields oils_persist:primary="code">
1108                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1109                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1110                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1111                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1112                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1113                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1114                 </fields>
1115                 <links/>
1116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1117             <actions>
1118                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1119                 <retrieve/>
1120                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1121                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1122             </actions>
1123         </permacrud>
1124         </class>
1125
1126         <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">
1127                 <fields oils_persist:primary="code">
1128                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1129                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1130                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1131                 </fields>
1132                 <links/>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1136                 <retrieve/>
1137                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1138                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1139             </actions>
1140         </permacrud>
1141         </class>
1142
1143         <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">
1144                 <fields oils_persist:primary="code">
1145                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1146                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1147                 </fields>
1148                 <links/>
1149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1150             <actions>
1151                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1152                 <retrieve/>
1153                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1154                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1155             </actions>
1156         </permacrud>
1157         </class>
1158
1159         <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">
1160                 <fields oils_persist:primary="code">
1161                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1162                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1163                 </fields>
1164                 <links/>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1170                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="code">
1177                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1178                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1179                 </fields>
1180                 <links/>
1181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1182             <actions>
1183                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1184                 <retrieve/>
1185                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1186                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1187             </actions>
1188         </permacrud>
1189         </class>
1190
1191         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1192                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1193                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1194                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1195                 </fields>
1196                 <links/>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1202                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205         </class>
1206
1207         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1208                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1209                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1210                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1211                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1212                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1213                 </fields>
1214         <links>
1215             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1216             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1217             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1218         </links>
1219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1220             <actions>
1221                 <create permission="UPDATE_COPY">
1222                     <context link="target_copy" field="circ_lib"/>
1223                 </create>
1224                 <retrieve/>
1225                 <update permission="UPDATE_COPY">
1226                     <context link="target_copy" field="circ_lib"/>
1227                 </update>
1228                 <delete permission="UPDATE_COPY">
1229                     <context link="target_copy" field="circ_lib"/>
1230                 </delete>
1231             </actions>
1232         </permacrud>
1233         </class>
1234
1235         <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">
1236                 <fields oils_persist:primary="code">
1237                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1238                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1239                 </fields>
1240                 <links/>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1246                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249         </class>
1250
1251         <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">
1252                 <fields oils_persist:primary="code">
1253                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1254                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1255                 </fields>
1256                 <links/>
1257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1258             <actions>
1259                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1260                 <retrieve/>
1261                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1262                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1263             </actions>
1264         </permacrud>
1265         </class>
1266
1267         <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">
1268                 <fields oils_persist:primary="code">
1269                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1270                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1271                 </fields>
1272                 <links/>
1273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1274             <actions>
1275                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1276                 <retrieve/>
1277                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1278                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1279             </actions>
1280         </permacrud>
1281         </class>
1282
1283     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1284         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1285             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1286             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1287             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1288             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1289             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1290             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1291             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1292             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1293             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1294             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1295             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1296             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1297             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1298             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1299             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1300         </fields>
1301         <links/>
1302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1303             <actions>
1304                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1305                 <retrieve/>
1306                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1307                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1308             </actions>
1309         </permacrud>
1310     </class>
1311
1312     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1313         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1314             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1315             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1316             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1317             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1318             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1319             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1320             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1321             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1322             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1323             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1324             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1325             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1326             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1327             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1328             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1329         </fields>
1330         <links/>
1331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332             <actions>
1333                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1334                 <retrieve/>
1335                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1336                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1337             </actions>
1338         </permacrud>
1339     </class>
1340
1341     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1342         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1343             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1344             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1345             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1346             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1347             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1348         </fields>
1349         <links>
1350             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1351             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1352             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1353         </links>
1354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1355             <actions>
1356                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1357                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1358                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1359                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1360             </actions>
1361         </permacrud>
1362     </class>
1363
1364         <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">
1365                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1366                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1367                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1368                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1369                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1370                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1371                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1372                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1373                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1374                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1375                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1376                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1377                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1378                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1379                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1380                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1381                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1382             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1383                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1384                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1385                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1386                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1387                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1388                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1389                 </fields>
1390                 <links>
1391                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1392                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1393                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1394                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1395                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1396                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1397                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1398                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1399                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1400                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1401                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1402                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1403                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1404             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1405                 </links>
1406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1407             <actions>
1408                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1409                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1410                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1411                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1412             </actions>
1413         </permacrud>
1414         </class>
1415
1416         <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">
1417                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1418                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1419                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1420                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1421                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1422                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1423                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1424                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1425                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1426                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1427                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1428                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1429                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1430                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1431                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1432             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1433                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1434                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1435             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1436                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1437                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1438                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1439                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1440             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1441             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1442             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1443                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1444                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1445                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1446                 </fields>
1447                 <links>
1448                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1449                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1450                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1451                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1452                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1453                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1454                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1455                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1456                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1457                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1458                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1459                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1460                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1461             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1462                 </links>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1466                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1467                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1468                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1469             </actions>
1470         </permacrud>
1471         </class>
1472
1473         <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">
1474                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1475                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1476                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1477                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1478                 </fields>
1479                 <links>
1480                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1481                 </links>
1482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1483             <actions>
1484                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1485                     <context link="matchpoint" field="org_unit"/>
1486                 </create>
1487                 <retrieve/>
1488                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1489                     <context link="matchpoint" field="org_unit"/>
1490                 </update>
1491                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1492                     <context link="matchpoint" field="org_unit"/>
1493                 </delete>
1494             </actions>
1495         </permacrud>
1496         </class>
1497
1498         <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">
1499                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1500                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1501                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1502                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1503                 </fields>
1504                 <links>
1505                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1506                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1507                 </links>
1508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1509             <actions>
1510                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1511                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1512                 </create>
1513                 <retrieve/>
1514                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1515                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1516                 </update>
1517                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1518                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1519                 </delete>
1520             </actions>
1521         </permacrud>
1522         </class>
1523
1524         <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">
1525                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1526                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1527                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1528                 </fields>
1529                 <links/>
1530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1531             <actions>
1532                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1533                 <retrieve/>
1534                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1535                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1536             </actions>
1537         </permacrud>
1538         </class>
1539
1540         <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">
1541                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1542                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1543                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1544                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1545                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1546                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1547                 </fields>
1548                 <links>
1549                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1550                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1551                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1552                 </links>
1553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1554             <actions>
1555                 <create permission="ADMIN_SURVEY">
1556                     <context link="survey" field="owner"/>
1557                 </create>
1558                 <retrieve/>
1559                 <update permission="ADMIN_SURVEY">
1560                     <context link="survey" field="owner"/>
1561                 </update>
1562                 <delete permission="ADMIN_SURVEY">
1563                     <context link="survey" field="owner"/>
1564                 </delete>
1565             </actions>
1566         </permacrud>
1567         </class>
1568         <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">
1569                 <fields oils_persist:primary="id" oils_persist:sequence="">
1570                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1571                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1572                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1573                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1574                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1575                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1576                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1577                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1578                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1579                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1580                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1581                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1582                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1583                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1584                 </fields>
1585                 <links>
1586                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1587                 </links>
1588         </class>
1589         <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">
1590                 <fields oils_persist:primary="id" oils_persist:sequence="">
1591                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1592                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1593                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1594                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1595                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1596                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1597                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1598                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1599                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1600                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1601                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1602                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1603                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1604                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1605                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1606                 </fields>
1607                 <links>
1608                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1609                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1610                 </links>
1611         </class>
1612         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1613                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1614                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1615                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1616                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1617                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1618                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1619                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1620                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1621                 </fields>
1622                 <links>
1623                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1624                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1625                 </links>
1626         </class>
1627         <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">
1628                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1629                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1630                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1631                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1632                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1633                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1634                 </fields>
1635                 <links>
1636                         <link field="usr" reltype="has_a" key="id" class="au"/>
1637                 </links>
1638         </class>
1639         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1640                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1641                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1642                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1643                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1644                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1645                 </fields>
1646                 <links>
1647                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1648                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1649                 </links>
1650         </class>
1651         <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">
1652                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1653                         <field name="field" reporter:datatype="link"/>
1654                         <field name="id" reporter:datatype="id" />
1655                         <field name="source" reporter:datatype="link"/>
1656                         <field name="value" reporter:datatype="text"/>
1657                 </fields>
1658                 <links>
1659                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1660                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1661                 </links>
1662         </class>
1663         <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">
1664                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1665                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1666                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1667                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1668                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1669                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1670                 </fields>
1671                 <links>
1672                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1673                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1674                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1675                 </links>
1676         </class>
1677         <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">
1678                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1679                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1680                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1681                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1682                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1683                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1684                 </fields>
1685                 <links>
1686                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1687                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1688                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1689                 </links>
1690         </class>
1691         <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">
1692                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1693                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1694                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1695                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1696                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1697                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1698                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1699                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1700                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1701                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1702                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1703                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1704                 </fields>
1705                 <links>
1706                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1707                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1708                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1709                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1710                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1711                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1712                 </links>
1713         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1714             <actions>
1715                 <create permission="TRANSIT_COPY" context_field="owner">
1716                     <context link="target_copy" field="circ_lib"/>
1717                 </create>
1718                 <retrieve/>
1719                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1720                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1721             </actions>
1722         </permacrud>
1723         </class>
1724         <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">
1725                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1726                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1727                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1728                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1729                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1730                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1731                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1732                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1733                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1734                 </fields>
1735                 <links>
1736                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1737                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1738                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1739                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1740                 </links>
1741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1742             <actions>
1743                 <create permission="ADMIN_SURVEY">
1744                     <context link="survey" field="owner"/>
1745                 </create>
1746                 <retrieve/>
1747                 <update permission="ADMIN_SURVEY">
1748                     <context link="survey" field="owner"/>
1749                 </update>
1750                 <delete permission="ADMIN_SURVEY">
1751                     <context link="survey" field="owner"/>
1752                 </delete>
1753             </actions>
1754         </permacrud>
1755         </class>
1756         <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">
1757                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1758                         <field name="bucket" />
1759                         <field name="id" reporter:datatype="id" />
1760                         <field name="target_copy" reporter:datatype="link"/>
1761                         <field name="create_time" reporter:datatype="timestamp" />
1762                         <field name="pos" reporter:datatype="int" />
1763                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1764                 </fields>
1765                 <links>
1766                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1767                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1768             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1769                 </links>
1770         </class>
1771         <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">
1772                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1773                         <field name="id" reporter:datatype="id" />
1774                         <field name="item" reporter:datatype="link"/>
1775                         <field name="note" reporter:datatype="text" />
1776                 </fields>
1777                 <links>
1778                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1779                 </links>
1780         </class>
1781
1782         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
1783                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1784                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1785                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1786                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1787                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1788                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1789                 </fields>
1790                 <links>
1791                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1792                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1793                 </links>
1794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1795                         <actions>
1796                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1797                                 <retrieve/>
1798                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1799                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1800                         </actions>
1801                 </permacrud>
1802         </class>
1803
1804         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
1805                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1806                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1807                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1808                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1809                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1810                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1811                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1812                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1813                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1814                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1815                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1816                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1817                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1818                 </fields>
1819                 <links>
1820                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1821                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1822                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1823                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1824                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1825                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1826                 </links>
1827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1828                         <actions>
1829                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1830                                 <retrieve/>
1831                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1832                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1833                         </actions>
1834                 </permacrud>
1835         </class>
1836
1837         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
1838                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1839                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1840                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1841                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1842                 </fields>
1843                 <links>
1844                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1845                 </links>
1846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1847                         <actions>
1848                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1849                                 <retrieve/>
1850                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1851                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1852                         </actions>
1853                 </permacrud>
1854         </class>
1855
1856         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
1857                 <fields oils_persist:primary="code">
1858                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1859                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1860                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1861                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1862                 </fields>
1863                 <links>
1864                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1865                 </links>
1866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1867                         <actions>
1868                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1869                                 <retrieve/>
1870                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1871                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1872                         </actions>
1873                 </permacrud>
1874         </class>
1875
1876         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
1877                 <fields oils_persist:primary="code">
1878                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1879                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1880                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1881                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1882                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1883                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1884                 </fields>
1885                 <links>
1886                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1887                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1888                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1889                 </links>
1890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1891                         <actions>
1892                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1893                                 <retrieve/>
1894                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1895                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1896                         </actions>
1897                 </permacrud>
1898         </class>
1899
1900     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
1901         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1902             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1903             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1904             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1905         </fields>
1906         <links>
1907             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1908             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1909         </links>
1910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1911             <actions>
1912                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1913                 <retrieve/>
1914                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1915                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1916             </actions>
1917         </permacrud>
1918     </class>
1919
1920         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1921                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1922                         <field name="active" reporter:datatype="bool"/>
1923                         <field name="create_date" reporter:datatype="timestamp"/>
1924                         <field name="creator" />
1925                         <field name="deleted" reporter:datatype="bool"/>
1926                         <field name="edit_date" reporter:datatype="timestamp"/>
1927                         <field name="editor" />
1928                         <field name="id" reporter:datatype="id" />
1929                         <field name="last_xact_id" />
1930                         <field name="marc" />
1931                         <field name="source" />
1932                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1933                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1934                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1935                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1936                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1937                 </fields>
1938                 <links>
1939                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1941                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1942                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1943                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1944                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1945                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1946                 </links>
1947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1948                         <actions>
1949                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1950                                 <retrieve/>
1951                                 <update permission="UPDATE_MARC" global_required="true"/>
1952                                 <delete permission="UPDATE_MARC" global_required="true"/>
1953                         </actions>
1954                 </permacrud>
1955         </class>
1956         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1957                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1958                         <field name="char_encoding" />
1959                         <field name="id" />
1960                         <field name="record" />
1961                         <field name="record_status" />
1962                         <field name="thesaurus" />
1963                 </fields>
1964                 <links>
1965                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1966                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
1967                 </links>
1968         </class>
1969         <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">
1970                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1971                         <field name="id" reporter:datatype="id" />
1972                         <field name="bib" reporter:datatype="link" />
1973                         <field name="authority" reporter:datatype="link" />
1974                 </fields>
1975                 <links>
1976                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1977                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1978                 </links>
1979         </class>
1980         <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">
1981                 <fields oils_persist:primary="code" oils_persist:sequence="">
1982                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1983                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1984                 </fields>
1985                 <links/>
1986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1987             <actions>
1988                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1989                 <retrieve/>
1990                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1991                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1992             </actions>
1993         </permacrud>
1994         </class>
1995         <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">
1996                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1997                         <field name="accepting_usr" />
1998                         <field name="amount" reporter:datatype="money" />
1999                         <field name="amount_collected" reporter:datatype="money" />
2000                         <field name="approval_code" reporter:datatype="text"/>
2001                         <field name="cash_drawer" reporter:datatype="link"/>
2002                         <field name="cc_first_name" reporter:datatype="text"/>
2003                         <field name="cc_last_name" reporter:datatype="text"/>
2004                         <field name="cc_number" reporter:datatype="text"/>
2005                         <field name="cc_order_number" reporter:datatype="text"/>
2006                         <field name="cc_type" reporter:datatype="text"/>
2007                         <field name="cc_processor" reporter:datatype="text"/>
2008                         <field name="expire_month" reporter:datatype="int" />
2009                         <field name="expire_year" reporter:datatype="int" />
2010                         <field name="id" reporter:datatype="id" />
2011                         <field name="note" reporter:datatype="text"/>
2012                         <field name="payment_ts" reporter:datatype="timestamp"/>
2013                         <field name="xact" reporter:datatype="link"/>
2014                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2015                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2016                 </fields>
2017                 <links>
2018                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2019                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2020                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2021                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2022                 </links>
2023         </class>
2024         <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">
2025                 <fields oils_persist:primary="name">
2026                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2027                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2028                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2029                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2030                 </fields>
2031                 <links/>
2032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2033             <actions>
2034                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2035                 <retrieve/>
2036                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2037                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2038             </actions>
2039         </permacrud>
2040         </class>
2041
2042         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2043                 <fields oils_persist:primary="alias">
2044                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2045                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2046                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2047                 </fields>
2048                 <links>
2049                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2050                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2051                 </links>
2052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2053             <actions>
2054                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2055                 <retrieve/>
2056                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2057                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2058             </actions>
2059         </permacrud>
2060         </class>
2061
2062         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2063                 <fields oils_persist:primary="name">
2064                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2065                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2066                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2067                 </fields>
2068                 <links>
2069                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2070                 </links>
2071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2072             <actions>
2073                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2074                 <retrieve/>
2075                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2076                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2077             </actions>
2078         </permacrud>
2079         </class>
2080
2081         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2082                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2083                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2084                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2085                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2086                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2087                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2088                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2089                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2090                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2091                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2092                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2093                 </fields>
2094                 <links>
2095                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2096                 </links>
2097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2098             <actions>
2099                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2100                 <retrieve/>
2101                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2102                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2103             </actions>
2104         </permacrud>
2105         </class>
2106         <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">
2107                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2108                         <field name="id" reporter:datatype="id" />
2109                         <field name="name" reporter:datatype="text"/>
2110                         <field name="xpath" reporter:datatype="text"/>
2111                         <field name="format" reporter:datatype="link"/>
2112                         <field name="first_word" reporter:datatype="bool" />
2113                 </fields>
2114                 <links/>
2115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2116             <actions>
2117                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2118                 <retrieve/>
2119                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2120                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2121             </actions>
2122         </permacrud>
2123         </class>
2124         <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">
2125                 <fields oils_persist:primary="code" oils_persist:sequence="">
2126                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2127                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2128                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2129                 </fields>
2130                 <links/>
2131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2132             <actions>
2133                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2134                 <retrieve/>
2135                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2136                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2137             </actions>
2138         </permacrud>
2139         </class>
2140         <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">
2141                 <fields oils_persist:primary="code" oils_persist:sequence="">
2142                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2143                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2144                 </fields>
2145                 <links/>
2146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2147             <actions>
2148                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2149                 <retrieve/>
2150                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2151                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2152             </actions>
2153         </permacrud>
2154         </class>
2155     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2156         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2157             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
2158             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2159             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2160             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2161         </fields>
2162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2163             <actions>
2164                 <retrieve/>
2165             </actions>
2166         </permacrud>
2167     </class>
2168         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2169                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2170                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2171                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2172                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2173                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2174                 </fields>
2175                 <links>
2176                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2177                 </links>
2178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2179             <actions>
2180                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2181                 <retrieve/>
2182                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2183                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2184             </actions>
2185         </permacrud>
2186         </class>
2187         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2188                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2189                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2190                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2191                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2192                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2193                 </fields>
2194                 <links>
2195                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2196                 </links>
2197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2198             <actions>
2199                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2200                 <retrieve/>
2201                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2202                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2203             </actions>
2204         </permacrud>
2205         </class>
2206         <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">
2207                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2208                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2209                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2210                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2211                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2212                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2213                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2214                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2215                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2216                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2217                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2218                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2219                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2220                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2221                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2222                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2223                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2224                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2225                 </fields>
2226                 <links>
2227                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2228                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2229                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2230                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2231                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2232                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2233                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2234                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2235                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2236                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2237                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2238                 </links>
2239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240             <actions>
2241                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2242                 <retrieve/>
2243                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2244                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2245             </actions>
2246         </permacrud>
2247         </class>
2248         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2249                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2250                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2251                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2252                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2253                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2254                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2255                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2256                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2257                 </fields>
2258                 <links>
2259                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2260                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2261         </links>
2262         </class>
2263         <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">
2264                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2265                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2266                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2267                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2268                 </fields>
2269                 <links>
2270                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2271                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2272                 </links>
2273         </class>
2274         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2275                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2276                         <field name="id" reporter:datatype="id" />
2277                         <field name="value" oils_persist:i18n="true" />
2278                 </fields>
2279                 <links/>
2280         </class>
2281         <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">
2282                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2283                         <field name="balance_owed" reporter:datatype="money" />
2284                         <field name="total_owed" reporter:datatype="money" />
2285                         <field name="total_paid" reporter:datatype="money" />
2286                         <field name="usr" reporter:datatype="link"/>
2287                 </fields>
2288                 <links>
2289                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2290         </links>
2291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2292             <actions>
2293                 <retrieve permission="VIEW_USER">
2294                     <context link="usr" field="home_ou"/>
2295                 </retrieve>
2296             </actions>
2297         </permacrud>
2298         </class>
2299         <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">
2300                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2301                         <field name="collector" />
2302                         <field name="enter_time" reporter:datatype="timestamp"/>
2303                         <field name="id" reporter:datatype="id" />
2304                         <field name="location" reporter:datatype="link"/>
2305                         <field name="usr" reporter:datatype="link"/>
2306                 </fields>
2307                 <links>
2308                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2309                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2310                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2311                 </links>
2312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2313             <actions>
2314                 <create permission="money.collections_tracker.create" context_field="location"/>
2315                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2316                 <delete permission="money.collections_tracker.create" context_field="location"/>
2317             </actions>
2318         </permacrud>
2319         </class>
2320         <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">
2321                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2322                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2323                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2324                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2325                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2326                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2327                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2328                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2329                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2330                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2331                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2332                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2333                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2334                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2335                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2336                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2337                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2338                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2339                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2340                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2341                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2342                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2343                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2344                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2345                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2346                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2347                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2348                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2349                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2350                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2351                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2352                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2353                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2354                 </fields>
2355                 <links>
2356                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2357                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2358                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2359                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2360                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2361                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2362                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2363                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2364                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2365                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2366                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2367                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2368                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2369                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2370                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2371                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2372                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2373                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2374                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2375                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2376                 </links>
2377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2378             <actions>
2379                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2380                 <retrieve/>
2381                 <update permission="UPDATE_MARC" global_required="true"/>
2382             </actions>
2383         </permacrud>
2384         </class>
2385         <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">
2386                 <fields oils_persist:primary="id">
2387                         <field name="dow_0_close" />
2388                         <field name="dow_0_open" />
2389                         <field name="dow_1_close" />
2390                         <field name="dow_1_open" />
2391                         <field name="dow_2_close" />
2392                         <field name="dow_2_open" />
2393                         <field name="dow_3_close" />
2394                         <field name="dow_3_open" />
2395                         <field name="dow_4_close" />
2396                         <field name="dow_4_open" />
2397                         <field name="dow_5_close" />
2398                         <field name="dow_5_open" />
2399                         <field name="dow_6_close" />
2400                         <field name="dow_6_open" />
2401                         <field name="id" reporter:datatype="id" />
2402                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2403                 </fields>
2404                 <links>
2405                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2406                 </links>
2407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2408             <actions>
2409                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2410                 <retrieve/>
2411                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2412                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2413             </actions>
2414         </permacrud>
2415         </class>
2416         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2417                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2418                         <field name="id" reporter:datatype="id" />
2419                         <field name="record" reporter:datatype="link"/>
2420                         <field name="label" reporter:datatype="text"/>
2421                         <field name="label_sortkey" reporter:datatype="text"/>
2422                 </fields>
2423                 <links>
2424                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2425                 </links>
2426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2427             <actions>
2428                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2429                 <retrieve/>
2430                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2431                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2432             </actions>
2433         </permacrud>
2434         </class>
2435         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2436                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2437                         <field name="id" reporter:datatype="id" />
2438                         <field name="target_copy" reporter:datatype="link" />
2439                         <field name="part" reporter:datatype="link"/>
2440                 </fields>
2441                 <links>
2442                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2443                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2444                 </links>
2445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2446             <actions>
2447                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2448                 <retrieve/>
2449                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2450                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2451             </actions>
2452         </permacrud>
2453         </class>
2454         <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">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2456                         <field name="close_end" reporter:datatype="timestamp" />
2457                         <field name="close_start" reporter:datatype="timestamp" />
2458                         <field name="id" reporter:datatype="id" />
2459                         <field name="org_unit" reporter:datatype="org_unit"/>
2460                         <field name="reason" reporter:datatype="text"/>
2461                 </fields>
2462                 <links>
2463                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2464                 </links>
2465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2466             <actions>
2467                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2468                 <retrieve/>
2469                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2470                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2471             </actions>
2472         </permacrud>
2473         </class>
2474         <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">
2475                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2476                         <field name="extended" reporter:datatype="interval"/>
2477                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2478                         <field name="max_renewals" reporter:datatype="int" />
2479                         <field name="name" reporter:datatype="text"/>
2480                         <field name="normal" reporter:datatype="interval"/>
2481                         <field name="shrt" reporter:datatype="interval"/>
2482                 </fields>
2483                 <links>
2484                 </links>
2485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486             <actions>
2487                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2488                 <retrieve/>
2489                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2490                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2491             </actions>
2492         </permacrud>
2493         </class>
2494
2495         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
2496                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2497                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2498                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2499             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2500                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2501             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2502                 </fields>
2503                 <links>
2504             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2505                 </links>
2506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2507             <actions>
2508                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2509                 <retrieve/>
2510                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2511                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2512             </actions>
2513                 </permacrud>
2514         </class>
2515
2516         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
2517                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2518                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2519                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2520                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2521             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2522                 </fields>
2523                 <links>
2524                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2525                 </links>
2526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2527             <actions>
2528                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2529                 <retrieve/>
2530                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2531                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2532             </actions>
2533                 </permacrud>
2534         </class>
2535
2536         <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">
2537                 <fields oils_persist:primary="id" oils_persist:sequence="">
2538                         <field name="balance_owed" reporter:datatype="money"/>
2539                         <field name="id" reporter:datatype="id" />
2540                         <field name="last_billing_note" reporter:datatype="text"/>
2541                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2542                         <field name="last_billing_type" reporter:datatype="text"/>
2543                         <field name="last_payment_note" reporter:datatype="text"/>
2544                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2545                         <field name="last_payment_type" reporter:datatype="text"/>
2546                         <field name="total_owed" reporter:datatype="money"/>
2547                         <field name="total_paid" reporter:datatype="money"/>
2548                         <field name="usr" reporter:datatype="link"/>
2549                         <field name="xact_finish" reporter:datatype="timestamp" />
2550                         <field name="xact_start" reporter:datatype="timestamp" />
2551                         <field name="xact_type" reporter:datatype="text"/>
2552                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2554                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2556                         <field name="billing_location" reporter:datatype="link"/>
2557                 </fields>
2558                 <links>
2559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2560                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2561                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2562                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2563                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2564                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2565                 </links>
2566         </class>
2567         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2568                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2569                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2570                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2571                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2572                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2573                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2574                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2575                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2576                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2577                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2578                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2579                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2580                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2581                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2582                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2583                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2584                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2585                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2586                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2587                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2588                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2589                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2590                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2591                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2592                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2593                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2594                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2595                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2596                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2597                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2598                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2599                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2600                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2601                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2602                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2603                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2604                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2605                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2606                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2607                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2608                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2609                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2610                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2611                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2612                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2613                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2614                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2615                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2616                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2617                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2618                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2619                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2620                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2621                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2622                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2623                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2624                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2625                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2626                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2627                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2628                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2629                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2630                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2631                 </fields>
2632                 <links>
2633                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2634                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2635                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2636                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2637                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2638                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2639                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2640                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2641                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2642                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2643                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2644                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2645                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2646                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2647                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2648                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2649                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2650                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2651                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2652                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2653                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2654                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2655                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2656                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2657                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2658                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2659                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2660                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2661                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2662                 </links>
2663         </class>
2664
2665         <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">
2666                 <fields oils_persist:primary="name">
2667                         <field name="name" reporter:datatype="text"/>
2668                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2669                 </fields>
2670                 <links/>
2671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2672                         <actions>
2673                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2674                                 <retrieve/>
2675                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2676                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2677                         </actions>
2678                 </permacrud>
2679         </class>
2680         <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">
2681                 <fields oils_persist:primary="name">
2682                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2683                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2684                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2685                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2686                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2687                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2688                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2689                 </fields>
2690                 <links>
2691                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2692                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2693                 </links>
2694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2695                         <actions>
2696                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2697                                 <retrieve/>
2698                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2699                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2700                         </actions>
2701                 </permacrud>
2702         </class>
2703         <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">
2704                 <fields oils_persist:primary="name">
2705                         <field name="name" reporter:datatype="text"/>
2706                         <field name="label" reporter:datatype="text"/>
2707                         <field name="description" reporter:datatype="text"/>
2708                         <field name="datatype" reporter:datatype="text"/>
2709                         <field name="view_perm" reporter:datatype="link"/>
2710                         <field name="update_perm" reporter:datatype="link"/>
2711                         <field name="fm_class" reporter:datatype="text"/>
2712                         <field name="grp" reporter:datatype="link"/>
2713                 </fields>
2714                 <links>
2715                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2716                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2717                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2718                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2719                 </links>
2720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2721                         <actions>
2722                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2723                                 <retrieve/>
2724                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2725                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2726                         </actions>
2727                 </permacrud>
2728         </class>
2729         <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">
2730                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2731                         <field name="id" />
2732                         <field name="name"  reporter:datatype="text"/>
2733                         <field name="org_unit" reporter:datatype="org_unit"/>
2734                         <field name="value"  reporter:datatype="text"/>
2735                 </fields>
2736                 <links>
2737                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2738                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2739                 </links>
2740         </class>
2741         <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">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2743                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2744                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2745                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2746                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2747                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2748                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2749                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2750                 </fields>
2751                 <links>
2752                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2753                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2754                 </links>
2755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2756             <actions>
2757                 <create permission="CREATE_COPY_NOTE">
2758                     <context link="owning_copy" field="circ_lib"/>
2759                 </create>
2760                 <retrieve permission="VIEW_COPY_NOTES">
2761                     <context link="owning_copy" field="circ_lib"/>
2762                 </retrieve>
2763                 <update permission="UPDATE_COPY_NOTE">
2764                     <context link="owning_copy" field="circ_lib"/>
2765                 </update>
2766                 <delete permission="DELETE_COPY_NOTE">
2767                     <context link="owning_copy" field="circ_lib"/>
2768                 </delete>
2769             </actions>
2770         </permacrud>
2771         </class>
2772         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2773                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2774                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2775                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2776                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2777                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2778                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2779                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2780                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2781                 </fields>
2782                 <links>
2783                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2784                 </links>
2785         </class>
2786         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2787                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2788                         <field name="fingerprint"  reporter:datatype="text"/>
2789                         <field name="id" reporter:datatype="id" />
2790                         <field name="master_record" reporter:datatype="link"/>
2791                         <field name="mods"  reporter:datatype="text"/>
2792                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2793                 </fields>
2794                 <links>
2795                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2796                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2797                 </links>
2798         </class>
2799         <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">
2800                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2801                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2802                         <field name="name"  reporter:datatype="text"/>
2803                 </fields>
2804                 <links/>
2805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2806             <actions>
2807                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2808                 <retrieve/>
2809                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2810                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2811             </actions>
2812         </permacrud>
2813         </class>
2814         <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">
2815                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2816                         <field name="code"  reporter:datatype="text"/>
2817                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2818                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2819                 </fields>
2820                 <links/>
2821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2822             <actions>
2823                 <create permission="CREATE_PERM" global_required="true"/>
2824                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2825                 <update permission="UPDATE_PERM" global_required="true"/>
2826                 <delete permission="DELETE_PERM" global_required="true"/>
2827             </actions>
2828         </permacrud>
2829         </class>
2830         <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">
2831                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2832                         <field name="id" reporter:datatype="id" />
2833                         <field name="metarecord" reporter:datatype="link"/>
2834                         <field name="source" reporter:datatype="link"/>
2835                 </fields>
2836                 <links>
2837                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2838                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2839                 </links>
2840         </class>
2841         <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">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2843                         <field name="id" reporter:datatype="id" />
2844                         <field name="field" reporter:datatype="link"/>
2845                         <field name="source" reporter:datatype="link"/>
2846                         <field name="value"  reporter:datatype="text"/>
2847                 </fields>
2848                 <links>
2849                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2850                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2851                 </links>
2852         </class>
2853         <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">
2854                 <oils_persist:source_definition>
2855                         SELECT * FROM metabib.author_field_entry
2856                                                 UNION ALL
2857                         SELECT * FROM metabib.keyword_field_entry
2858                                                 UNION ALL
2859                         SELECT * FROM metabib.identifier_field_entry
2860                                                 UNION ALL
2861                         SELECT * FROM metabib.title_field_entry
2862                                                 UNION ALL
2863                         SELECT * FROM metabib.subject_field_entry
2864                                                 UNION ALL
2865                         SELECT * FROM metabib.series_field_entry
2866                 </oils_persist:source_definition>
2867                 <fields>
2868                         <field name="field" reporter:datatype="link"/>
2869                         <field name="id" reporter:datatype="id" />
2870                         <field name="source" reporter:datatype="link"/>
2871                         <field name="value"  reporter:datatype="text"/>
2872                 </fields>
2873                 <links>
2874                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2875                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2876                 </links>
2877         </class>
2878         <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">
2879                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2880                         <field name="field" reporter:datatype="link"/>
2881                         <field name="id" reporter:datatype="id" />
2882                         <field name="source" reporter:datatype="link"/>
2883                         <field name="value"  reporter:datatype="text"/>
2884                 </fields>
2885                 <links>
2886                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2887                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2888                 </links>
2889         </class>
2890         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2891                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2892                         <field name="accepting_usr" reporter:datatype="link"/>
2893                         <field name="amount" reporter:datatype="money" />
2894                         <field name="amount_collected" reporter:datatype="money" />
2895                         <field name="cash_drawer" reporter:datatype="link"/>
2896                         <field name="id" reporter:datatype="id" />
2897                         <field name="note"  reporter:datatype="text"/>
2898                         <field name="payment_ts" reporter:datatype="timestamp"/>
2899                         <field name="xact" reporter:datatype="link"/>
2900                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2901                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2902                 </fields>
2903                 <links>
2904                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2905                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2906                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2907                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2908                 </links>
2909         </class>
2910         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2911                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2912                         <field name="accepting_usr" reporter:datatype="link"/>
2913                         <field name="amount" reporter:datatype="money" />
2914                         <field name="amount_collected" reporter:datatype="money" />
2915                         <field name="id" reporter:datatype="id" />
2916                         <field name="note"  reporter:datatype="text"/>
2917                         <field name="payment_ts" reporter:datatype="timestamp"/>
2918                         <field name="xact" reporter:datatype="link"/>
2919                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2920                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2921                 </fields>
2922                 <links>
2923                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2924                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2925                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2926                 </links>
2927         </class>
2928         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2929                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2930                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2931                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2932                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2933                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2934                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2935                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2936                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2937                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2938                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2939                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2940                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2941                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2942                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2943                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2944                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2945                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2946                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2947                 </fields>
2948                 <links>
2949                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2950                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2951                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2952                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2953                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2954                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2955                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2956                 </links>
2957         </class>
2958
2959         <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">
2960                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2961                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2962                         <field name="name"  reporter:datatype="text"/>
2963                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2964                         <field name="block_list" reporter:datatype="text"/>
2965                         <field name="staff_alert" reporter:datatype="bool"/>
2966                         <field name="org_depth" reporter:datatype="int"/>
2967                 </fields>
2968                 <links/>
2969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2970             <actions>
2971                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2972                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2973                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2974                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2975             </actions>
2976         </permacrud>
2977         </class>
2978         <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">
2979                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2980                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2981                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2982                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2983                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2984                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2985                 </fields>
2986                 <links>
2987                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2988                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2989                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2990         </links>
2991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2992             <actions>
2993                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2994                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2995                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2996                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2997             </actions>
2998         </permacrud>
2999         </class>
3000         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
3001                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3002                         <field name="holdable" reporter:datatype="bool"/>
3003                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3004                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3005                         <field name="opac_visible" reporter:datatype="bool"/>
3006             <field name="copy_active" reporter:datatype="bool"/>
3007                 </fields>
3008                 <links/>
3009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010             <actions>
3011                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3012                 <retrieve/>
3013                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3014                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3015             </actions>
3016         </permacrud>
3017         </class>
3018         <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">
3019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3020                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3021                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3022                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3023                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3024                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3025                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3026                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3027                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3028                 </fields>
3029                 <links>
3030                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3031                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3032                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3033                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3034                 </links>
3035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3036                         <actions>
3037                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3038                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3039                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3040                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3041                         </actions>
3042                 </permacrud>
3043         </class>
3044         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3045                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3046                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3047                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3048                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3049                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3050                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3051                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3052                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3053                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3054                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3055                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3056                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3057                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3058                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3059                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3060                 </fields>
3061                 <links>
3062                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3063                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3064                 </links>
3065         </class>
3066         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3067                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3068                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3069                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3070                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3071                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3072                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3073                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3074                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3075                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3076                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3077                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3078                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3079                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3080                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3081                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3082                 </fields>
3083                 <links>
3084                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3085                 </links>
3086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087                         <actions>
3088                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3089                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3090                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3091                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3092                         </actions>
3093                 </permacrud>
3094         </class>
3095
3096
3097         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3099                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3100                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3101                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3102                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3103                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3104                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3105                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3106                 </fields>
3107                 <links>
3108                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3109                 </links>
3110         </class>
3111
3112         <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">
3113                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3114                         <field name="call_number" />
3115                         <field name="create_date" reporter:datatype="timestamp"/>
3116                         <field name="creator" reporter:datatype="link"/>
3117                         <field name="id" reporter:datatype="id" />
3118                         <field name="pub" reporter:datatype="bool"/>
3119                         <field name="title"  reporter:datatype="text"/>
3120                         <field name="value"  reporter:datatype="text"/>
3121                 </fields>
3122                 <links>
3123                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3124                 </links>
3125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3126             <actions>
3127                 <create permission="CREATE_VOLUME_NOTE">
3128                     <context link="call_number" field="owning_lib"/>
3129                 </create>
3130                 <retrieve permission="VIEW_VOLUME_NOTES">
3131                     <context link="call_number" field="owning_lib"/>
3132                 </retrieve>
3133                 <update permission="UPDATE_VOLUME_NOTE">
3134                     <context link="call_number" field="owning_lib"/>
3135                 </update>
3136                 <delete permission="DELETE_VOLUME_NOTE">
3137                     <context link="call_number" field="owning_lib"/>
3138                 </delete>
3139             </actions>
3140         </permacrud>
3141         </class>
3142         <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">
3143                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3144                         <field name="create_date" reporter:datatype="timestamp"/>
3145                         <field name="creator" reporter:datatype="link"/>
3146                         <field name="edit_date" reporter:datatype="timestamp"/>
3147                         <field name="editor" reporter:datatype="link"/>
3148                         <field name="id" reporter:datatype="id" />
3149                         <field name="record" reporter:datatype="link"/>
3150                         <field name="value" reporter:datatype="text"/>
3151                 </fields>
3152                 <links>
3153                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3154                 </links>
3155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3156             <actions>
3157                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3158                 <retrieve/>
3159                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3160                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3161             </actions>
3162         </permacrud>
3163         </class>
3164         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3165         <oils_persist:source_definition>
3166 SELECT  usr,
3167         SUM(
3168             CASE
3169                 WHEN (
3170                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3171                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3172                 ) THEN 1
3173                 ELSE 0
3174             END
3175         ) AS out,
3176
3177         SUM(
3178             CASE
3179                 WHEN (
3180                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3181                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3182                 ) THEN 1
3183                 ELSE 0
3184             END
3185         ) AS overdue,
3186
3187         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3188         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3189         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3190   FROM  action.circulation
3191   WHERE checkin_time IS NULL
3192   GROUP BY 1
3193         </oils_persist:source_definition>
3194         <fields oils_persist:primary="usr">
3195             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3196             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3197             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3198             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3199             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3200             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3201         </fields>
3202         <links>
3203             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3204         </links>
3205         </class>
3206         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3207         <oils_persist:source_definition>
3208 SELECT  usr,
3209         ARRAY_TO_STRING(ARRAY_ACCUM(
3210             CASE
3211                 WHEN (
3212                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3213                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3214                 ) THEN id
3215                 ELSE 0
3216             END
3217         ),',') AS out,
3218
3219         ARRAY_TO_STRING(ARRAY_ACCUM(
3220             CASE
3221                 WHEN (
3222                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3223                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3224                 ) THEN id
3225                 ELSE 0
3226             END
3227         ),',') AS overdue,
3228
3229         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3230         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3231         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3232   FROM  action.circulation
3233   WHERE checkin_time IS NULL
3234   GROUP BY 1
3235         </oils_persist:source_definition>
3236         <fields oils_persist:primary="usr">
3237             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3238             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3239             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3240             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3241             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3242             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3243         </fields>
3244         <links>
3245             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3246         </links>
3247         </class>
3248         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3249                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3250                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3251                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3252                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3253                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3254                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3255                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3256                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3257                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3258                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3259                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3260                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3261                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3262                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3263                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3264                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3265                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3266                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3267                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3268                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3269                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3270                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3271                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3272                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3273                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3274                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3275                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3276                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3277                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3278                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3279                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3280                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3281                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3282                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3283                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3284                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3285                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3286                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3287                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3288                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3289                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3290                 </fields>
3291                 <links>
3292                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3293                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3294                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3295                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3296                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3297                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3298                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3299                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3300                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3301                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3302                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3303                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3304                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3305                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3306                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3307                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3308                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3309                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3310                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3311                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3312                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3313                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3314                 </links>
3315         </class>
3316         <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">
3317                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3318                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3319                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3320                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3321                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3322                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3323                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3324                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3325                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3326                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3327                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3328                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3329                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3330                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3331                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3332                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3333                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3334                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3335                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3336                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3337                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3338                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3339                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3340                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3341                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3342                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3343                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3344                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3345                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3346                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3347                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3348                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3349                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3350                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3351                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3352                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3353                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3354                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3355                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3356                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3357                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3358                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3359                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3360                 </fields>
3361                 <links>
3362                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3363                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3364                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3365                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3366                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3367                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3368                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3369                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3370                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3371                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3372                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3373                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3374                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3375                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3376                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3377                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3378                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3379                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3380                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3381                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3382                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3383                 </links>
3384         </class>
3385         <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">
3386                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3387                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3388                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3389                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3390                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3391                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3392                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3393                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3394                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3395                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3396                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3397                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3398                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3399                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3400                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3401                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3402                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3403                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3404                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3405                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3406                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3407                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3408                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3409                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3410                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3411                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3412                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3413                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3414                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3415                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3416                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3417                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3418                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3419                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3420                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3421                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3422                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3423                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3424                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3425                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3426                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3427                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3428                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3429                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3430                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3431                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3432                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3433                 </fields>
3434                 <links>
3435                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3436                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3437                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3438                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3439                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3440                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3441                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3442                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3443                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3444                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3445                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3446                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3447                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3448                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3449                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3450                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3451                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3452                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3453                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3454                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3455                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3456                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3457                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3458                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3459                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3460                 </links>
3461         </class>
3462
3463         <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">
3464                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3465                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3466                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3467                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3468                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3469                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3470                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3471                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3472                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3473                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3474                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3475                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3476                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3477                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3478                 </fields>
3479                 <links>
3480                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3481                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3482                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3483                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3484                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3485                 </links>
3486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3487                         <actions>
3488                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3489                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3490                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3491                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3492                         </actions>
3493                 </permacrud>
3494         </class>
3495
3496         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3497                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3498                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3499                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3500                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3501                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3502                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3503                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3504                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3505                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3506                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3507                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3508                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3509                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3510                 </fields>
3511                 <links>
3512                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3513                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3514                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3515                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3516                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3517                 </links>
3518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3519                         <actions>
3520                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3521                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3522                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3523                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3524                         </actions>
3525                 </permacrud>
3526         </class>
3527         
3528         <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">
3529                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3530                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3531                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3532                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3533                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3534                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3535                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3536                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3537                 </fields>
3538                 <links>
3539                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3540                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3541                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3542                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3543                 </links>
3544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3545                         <actions>
3546                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3547                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3548                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3549                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3550                         </actions>
3551                 </permacrud>
3552         </class>
3553         
3554         <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">
3555                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3556                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3557                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3558                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3559                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3560                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3561                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3562                 </fields>
3563                 <links>
3564                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3565                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3566                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3567                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3568                 </links>
3569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3570                         <actions>
3571                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3572                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3573                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3574                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3575                         </actions>
3576                 </permacrud>
3577         </class>
3578         
3579         <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">
3580                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3581                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3582                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3583                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3584                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3585                 </fields>
3586                 <links>
3587                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3588                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3589                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3590                 </links>
3591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3592                         <actions>
3593                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3594                     <context link="resource" field="owner" />
3595                 </create>
3596                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3597                     <context link="resource" field="owner" />
3598                 </retrieve>
3599                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3600                     <context link="resource" field="owner" />
3601                 </update>
3602                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3603                     <context link="resource" field="owner" />
3604                 </delete>
3605                         </actions>
3606                 </permacrud>
3607         </class>
3608         
3609         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3610                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3611                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3612                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3613                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3614                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3615                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3616                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3617                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3618                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3619                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3620                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3621                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3622                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3623                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3624                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3625                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3626                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3627                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3628                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3629                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3630                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3631                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3632                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3633                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3634                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3635                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3636                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3637                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3638                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3639                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3640                 </fields>
3641                 <links>
3642                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3643                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3644                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3645                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3646                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3647                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3648                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3649                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3650                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3651                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3652                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3653                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3654                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3655                 </links>
3656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3657                         <actions>
3658                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3659                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3660                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3661                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3662                         </actions>
3663                 </permacrud>
3664         </class>
3665         
3666         <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">
3667                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3668                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3669                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3670                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3671                 </fields>
3672                 <links>
3673                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3674                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3675                 </links>
3676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3677                         <actions>
3678                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3679                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3680                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3681                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3682                         </actions>
3683                 </permacrud>
3684         </class>
3685
3686         <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">
3687                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3688                         <field name="bucket" reporter:datatype="link"/>
3689                         <field name="id" reporter:datatype="id" />
3690                         <field name="target_call_number" reporter:datatype="link" />
3691                         <field name="create_time" reporter:datatype="timestamp" />
3692                         <field name="pos" reporter:datatype="int" />
3693                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3694                 </fields>
3695                 <links>
3696                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3697                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3698             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3699                 </links>
3700         </class>
3701         <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">
3702                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3703                         <field name="id" reporter:datatype="id" />
3704                         <field name="item" reporter:datatype="link"/>
3705                         <field name="note" reporter:datatype="text" />
3706                 </fields>
3707                 <links>
3708                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3709                 </links>
3710         </class>
3711         <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">
3712                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3713                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3714                         <field name="btype" reporter:datatype="text"/>
3715                         <field name="id" reporter:datatype="id" />
3716                         <field name="name" reporter:datatype="text"/>
3717                         <field name="description" reporter:datatype="text"/>
3718                         <field name="owner" reporter:datatype="link"/>
3719                         <field name="pub" reporter:datatype="bool"/>
3720                         <field name="create_time" reporter:datatype="timestamp" />
3721                 </fields>
3722                 <links>
3723                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3724                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3725                 </links>
3726         </class>
3727         <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">
3728                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3729                         <field name="id" reporter:datatype="id" />
3730                         <field name="bucket" reporter:datatype="link"/>
3731                         <field name="note" reporter:datatype="text" />
3732                 </fields>
3733                 <links>
3734                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3735                 </links>
3736         </class>
3737         <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">
3738                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3739                         <field name="hold" reporter:datatype="link"/>
3740                         <field name="id" reporter:datatype="id" />
3741                         <field name="target_copy" reporter:datatype="link"/>
3742                 </fields>
3743                 <links>
3744                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3745                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3746                 </links>
3747         </class>
3748         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3749                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3750                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3751                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3752                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3753                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3754                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3755                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3756                 </fields>
3757                 <links>
3758                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3759                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3760                 </links>
3761         </class>
3762         <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">
3763                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3764                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3765                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3766                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3767                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3768                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3769                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3770                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3771                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3772                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3773                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3774                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3775                 </fields>
3776                 <links>
3777                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3778                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3779                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3780                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3781                 </links>
3782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3783             <actions>
3784                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3785                 <retrieve/>
3786                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3787                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3788             </actions>
3789         </permacrud>
3790         </class>
3791
3792     <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">
3793         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3794             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3795             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3796             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3797             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3798         </fields>
3799         <links>
3800             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3801             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3802         </links>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3806                 <retrieve/>
3807                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3808                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3809             </actions>
3810         </permacrud>
3811     </class>
3812
3813         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3814                 <fields>
3815                         <field name="sre_id" oils_persist:virtual="true" />
3816                         <field name="location" oils_persist:virtual="true" />
3817                         <field name="owning_lib" oils_persist:virtual="true" />
3818                         <field name="basic_holdings" oils_persist:virtual="true" />
3819                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3820                         <field name="supplement_holdings" oils_persist:virtual="true" />
3821                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3822                         <field name="index_holdings" oils_persist:virtual="true" />
3823                         <field name="index_holdings_add" oils_persist:virtual="true" />
3824                         <field name="online" oils_persist:virtual="true" />
3825                         <field name="missing" oils_persist:virtual="true" />
3826                         <field name="incomplete" oils_persist:virtual="true" />
3827                 </fields>
3828         </class>
3829
3830         <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">
3831                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3832                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3833                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3834                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3835                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3836                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3837                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3838                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3839                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3840                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3841                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3842                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3843                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3844                 </fields>
3845                 <links>
3846                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3847                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3848                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3849                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3850                 </links>
3851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3852                         <actions>
3853                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3854                                 <retrieve/>
3855                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3856                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3857                         </actions>
3858                 </permacrud>
3859         </class>
3860
3861         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
3862                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3863                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3864                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3865                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3866                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3867                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3868                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3869                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3870                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3871                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3872                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3873                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3874                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3875                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3876                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3877                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3878                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3879                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3880                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3881                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3882                 </fields>
3883                 <links>
3884                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3885                 </links>
3886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3887                         <actions>
3888                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3889                                         <context link="subscription" field="owning_lib" />
3890                                 </create>
3891                                 <retrieve />
3892                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3893                                         <context link="subscription" field="owning_lib" />
3894                                 </update>
3895                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3896                                         <context link="subscription" field="owning_lib" />
3897                                 </delete>
3898                         </actions>
3899                 </permacrud>
3900         </class>
3901
3902         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3903                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3904                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3905                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3906                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3907                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3908                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3909                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3910                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3911                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3912                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3913                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3914                 </fields>
3915                 <links>
3916                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3917                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3918                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3919                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3920                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3921                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3922                 </links>
3923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3924                         <actions>
3925                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3926                                 <retrieve />
3927                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3928                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3929                         </actions>
3930                 </permacrud>
3931         </class>
3932
3933         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
3934                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3935                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3936                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3937                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3938                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3939                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3940                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3941                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3942                 </fields>
3943                 <links>
3944                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3945                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3946                 </links>
3947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3948                 </permacrud>
3949         </class>
3950
3951         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3952                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3953                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3954                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3955                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3956                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3957                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3958                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3959                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3960                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3961                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3962                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3963                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3964                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3965                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3966                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3967                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3968                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3969                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3970                 </fields>
3971                 <links>
3972                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3973                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3974                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3975                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3976                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3977                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3978                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3979                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3980                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3981                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3982                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3983                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3984                 </links>
3985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3986                         <actions>
3987                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3988                                 <retrieve />
3989                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3990                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3991                         </actions>
3992                 </permacrud>
3993         </class>
3994
3995         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
3996                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3997                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3998                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3999                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4000                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4001                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4002                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4003                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4004                 </fields>
4005                 <links>
4006                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4007                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4008                 </links>
4009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4010                         <actions>
4011                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4012                                         <context link="distribution" field="holding_lib" />
4013                                 </create>
4014                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4015                                         <context link="distribution" field="holding_lib" />
4016                                 </retrieve>
4017                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4018                                         <context link="distribution" field="holding_lib" />
4019                                 </update>
4020                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4021                                         <context link="distribution" field="holding_lib" />
4022                                 </delete>
4023                         </actions>
4024                 </permacrud>
4025         </class>
4026
4027         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4028                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4029                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4030                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4031                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4032                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4033                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4034                 </fields>
4035                 <links>
4036                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4037                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4038                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4039                 </links>
4040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4041                         <actions>
4042                                 <create permission="ADMIN_SERIAL_STREAM">
4043                                         <context link="distribution" field="holding_lib" />
4044                                 </create>
4045                                 <retrieve />
4046                                 <update permission="ADMIN_SERIAL_STREAM">
4047                                         <context link="distribution" field="holding_lib" />
4048                                 </update>
4049                                 <delete permission="ADMIN_SERIAL_STREAM">
4050                                         <context link="distribution" field="holding_lib" />
4051                                 </delete>
4052                         </actions>
4053                 </permacrud>
4054         </class>
4055
4056         <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">
4057                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4058                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4059                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4060                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4061                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4062                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4063                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4064                 </fields>
4065                 <links>
4066                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4067                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4068                 </links>
4069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4070                         <actions>
4071                                 <create permission="ADMIN_SERIAL_STREAM">
4072                                         <context link="stream" jump="distribution" field="holding_lib" />
4073                                 </create>
4074                                 <retrieve permission="RECEIVE_SERIAL">
4075                                         <context link="stream" jump="distribution" field="holding_lib" />
4076                                 </retrieve>
4077                                 <update permission="ADMIN_SERIAL_STREAM">
4078                                         <context link="stream" jump="distribution" field="holding_lib" />
4079                                 </update>
4080                                 <delete permission="ADMIN_SERIAL_STREAM">
4081                                         <context link="stream" jump="distribution" field="holding_lib" />
4082                                 </delete>
4083                         </actions>
4084                 </permacrud>
4085         </class>
4086
4087         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4088                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4089                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4090                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4091                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4092                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4093                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4094                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4095                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4096                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4097                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4098                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4099                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4100                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4101                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4102                 </fields>
4103                 <links>
4104                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4105                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4106                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4107                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4108                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4109                 </links>
4110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4111                         <actions>
4112                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4113                                         <context link="subscription" field="owning_lib" />
4114                                 </create>
4115                                 <retrieve/>
4116                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4117                                         <context link="subscription" field="owning_lib" />
4118                                 </update>
4119                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4120                                         <context link="subscription" field="owning_lib" />
4121                                 </delete>
4122                         </actions>
4123                 </permacrud>
4124         </class>
4125
4126         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4127                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4128                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4129                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4130                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4131                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4132                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4133                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4134                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4135                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4136                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4137                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4138                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4139                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4140                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4141                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4142                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4143                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4144                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4145                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4146                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4147                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4148                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4149                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4150                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4151                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4152                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4153                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4154                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4155                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4156                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4157                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4158                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4159                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4160                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4161                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4162                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4163                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4164                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4165                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4166                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4167                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4168                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4169                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4170                 </fields>
4171                 <links>
4172                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4173                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4174                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4175                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4176                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4177                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4178                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4179                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4180                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4181                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4182                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4183                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4184                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4185                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4186                 </links>
4187                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4188                         <actions>
4189                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4190                                 <retrieve/>
4191                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4192                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4193                         </actions>
4194                 </permacrud>
4195         </class>
4196
4197         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4198                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4199                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4200                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4201                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4202                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4203                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4204                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4205                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4206                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4207                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4208                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4209                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4210                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4211                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4212                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4213                 </fields>
4214                 <links>
4215                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4216                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4217                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4218                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4219                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4220                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4221                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4222                 </links>
4223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4224                         <actions>
4225                                 <create permission="ADMIN_SERIAL_ITEM">
4226                                         <context link="stream" jump="distribution" field="holding_lib" />
4227                                 </create>
4228                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4229                                         <context link="stream" jump="distribution" field="holding_lib" />
4230                                 </retrieve>
4231                                 <update permission="ADMIN_SERIAL_ITEM">
4232                                         <context link="stream" jump="distribution" field="holding_lib" />
4233                                 </update>
4234                                 <delete permission="ADMIN_SERIAL_ITEM">
4235                                         <context link="stream" jump="distribution" field="holding_lib" />
4236                                 </delete>
4237                         </actions>
4238                 </permacrud>
4239         </class>
4240
4241         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4242                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4243                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4244                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4245                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4246                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4247                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4248                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4249                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4250                 </fields>
4251                 <links>
4252                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4253                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4254                 </links>
4255                 <!-- Not available via PCRUD at this time -->
4256         </class>
4257
4258         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4260                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4261                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4262                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4263                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4264                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4265                 </fields>
4266                 <links>
4267                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4268                 </links>
4269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4270                         <actions>
4271                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4272                                         <context link="distribution" field="holding_lib" />
4273                                 </create>
4274                                 <retrieve/>
4275                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4276                                         <context link="distribution" field="holding_lib" />
4277                                 </update>
4278                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4279                                         <context link="distribution" field="holding_lib" />
4280                                 </create>
4281                         </actions>
4282                 </permacrud>
4283         </class>
4284
4285         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
4286                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4287                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4288                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4289                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4290                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4291                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4292                 </fields>
4293                 <links>
4294                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4295                 </links>
4296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4297                         <actions>
4298                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4299                                         <context link="distribution" field="holding_lib" />
4300                                 </create>
4301                                 <retrieve/>
4302                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4303                                         <context link="distribution" field="holding_lib" />
4304                                 </update>
4305                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4306                                         <context link="distribution" field="holding_lib" />
4307                                 </create>
4308                         </actions>
4309                 </permacrud>
4310         </class>
4311
4312         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
4313                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4314                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4315                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4316                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4317                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4318                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4319                 </fields>
4320                 <links>
4321                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4322                 </links>
4323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4324                         <actions>
4325                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4326                                         <context link="distribution" field="holding_lib" />
4327                                 </create>
4328                                 <retrieve/>
4329                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4330                                         <context link="distribution" field="holding_lib" />
4331                                 </update>
4332                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4333                                         <context link="distribution" field="holding_lib" />
4334                                 </create>
4335                         </actions>
4336                 </permacrud>
4337         </class>
4338
4339         <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">
4340                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4341                         <field name="id" reporter:datatype="id" />
4342                         <field name="owning_copy" reporter:datatype="link"/>
4343                         <field name="stat_cat" reporter:datatype="link"/>
4344                         <field name="stat_cat_entry" reporter:datatype="link"/>
4345                 </fields>
4346                 <links>
4347                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4348                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4349                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4350                 </links>
4351         </class>
4352         <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">
4353                 <fields oils_persist:primary="code">
4354                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4355                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4356                 </fields>
4357                 <links/>
4358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4359             <actions>
4360                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4361                 <retrieve/>
4362                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4363                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4364             </actions>
4365         </permacrud>
4366         </class>
4367         <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">
4368                 <fields oils_persist:primary="code">
4369                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4370                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4371                 </fields>
4372                 <links/>
4373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4374             <actions>
4375                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4376                 <retrieve/>
4377                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4378                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4379             </actions>
4380         </permacrud>
4381         </class>
4382         <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">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4384                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4385                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4386                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4387                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4388                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4389                 </fields>
4390                 <links>
4391             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4392         </links>
4393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4394             <actions>
4395                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4396                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4397                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4398                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4399             </actions>
4400         </permacrud>
4401         </class>
4402         <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">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4404                         <field name="id" reporter:datatype="id" />
4405                         <field name="name" reporter:datatype="text"/>
4406                 </fields>
4407                 <links/>
4408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4409             <actions>
4410                 <create permission="CREATE_LASSO" global_required="true"/>
4411                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4412                 <update permission="UPDATE_LASSO" global_required="true"/>
4413                 <delete permission="DELETE_LASSO" global_required="true"/>
4414             </actions>
4415         </permacrud>
4416         </class>
4417         <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">
4418                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4419                         <field name="id" reporter:datatype="id" />
4420                         <field name="lasso" reporter:datatype="link"/>
4421                         <field name="org_unit" reporter:datatype="org_unit"/>
4422                 </fields>
4423                 <links>
4424                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4425                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4426                 </links>
4427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4428             <actions>
4429                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4430                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4431                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4432                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4433             </actions>
4434         </permacrud>
4435         </class>
4436         <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">
4437                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4438                         <field name="id" reporter:datatype="id" />
4439                         <field name="from_org" reporter:datatype="org_unit"/>
4440                         <field name="to_org" reporter:datatype="org_unit"/>
4441                         <field name="prox" reporter:datatype="int" />
4442                 </fields>
4443                 <links>
4444                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4445                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4446                 </links>
4447         </class>
4448         <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">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4450                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4451                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4452                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4453                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4454                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4455                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4456                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4457                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4458                 </fields>
4459                 <links/>
4460         </class>
4461         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4462                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4463                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4464                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4465                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4466                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4467                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4468                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4469                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4470                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4471                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4472                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4473                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4474                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4475                 </fields>
4476                 <links>
4477                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4478                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4479                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4480                 </links>
4481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4482             <actions>
4483                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4484                 <retrieve/>
4485                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4486                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4487             </actions>
4488         </permacrud>
4489         </class>
4490         <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">
4491                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4492                         <field name="address_type"  reporter:datatype="text"/>
4493                         <field name="city"  reporter:datatype="text"/>
4494                         <field name="country"  reporter:datatype="text"/>
4495                         <field name="county"  reporter:datatype="text"/>
4496                         <field name="id" reporter:datatype="id" />
4497                         <field name="org_unit" reporter:datatype="org_unit"/>
4498                         <field name="post_code"  reporter:datatype="text"/>
4499                         <field name="state"  reporter:datatype="text"/>
4500                         <field name="street1"  reporter:datatype="text"/>
4501                         <field name="street2"  reporter:datatype="text"/>
4502                         <field name="valid" reporter:datatype="bool"/>
4503                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4504                 </fields>
4505                 <links>
4506                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4507                 </links>
4508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4509             <actions>
4510                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4511                 <retrieve/>
4512                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4513                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4514             </actions>
4515         </permacrud>
4516         </class>
4517         <!-- A note: Please update alhr when updating ahr -->
4518         <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">
4519                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4520                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4521                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4522                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4523                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4524                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4525                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4526                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4527                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4528                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4529                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4530                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4531                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4532                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4533                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4534                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4535                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4536                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4537                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4538                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4539                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4540                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4541                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4542                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4543                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4544                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4545                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4546                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4547                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4548                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4549                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4550                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4551                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4552                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4553                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4554                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4555                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4556                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4557                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4558                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4559                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4560                 </fields>
4561                 <links>
4562                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4563                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4564                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4565                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4566                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4567                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4568                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4569                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4570                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4571                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4572                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4573                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4574                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4575                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4576                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4577                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4578                 </links>
4579         </class>
4580         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4581                 <oils_persist:source_definition>
4582                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
4583                 </oils_persist:source_definition>
4584                 <fields oils_persist:primary="id">
4585                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4586                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4587                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4588                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4589                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4590                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4591                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4592                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4593                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4594                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4595                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4596                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4597                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4598                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4599                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4600                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4601                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4602                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4603                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4604                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4605                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4606                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4607                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4608                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4609                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4610                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4611                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4612                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4613                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4614                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4615                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4616                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4617                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4618                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4619                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4620                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4621                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4622                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4623                 </fields>
4624                 <links>
4625                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4626                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4627                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4628                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4629                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4630                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4631                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4632                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4633                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4634                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4635                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4636                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4637                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4638                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4639                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4640                 </links>
4641         </class>
4642
4643         <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">
4644                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4645                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4646                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4647                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4648                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4649                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4650                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4651                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4652                 </fields>
4653                 <links>
4654                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4655                 </links>
4656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4657                         <actions>
4658                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4659                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4660                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4661                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4662                         </actions>
4663                 </permacrud>
4664         </class>
4665         <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">
4666                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4667                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4668                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4669                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4670                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4671                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4672                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4673                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4674                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4675                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4676                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4677                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4678                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4679                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4680                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4681                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4682                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4683                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4684                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4685                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4686                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4687                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4688                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4689                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4690                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4691                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4692                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4693                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4694                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4695                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4696                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4697                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4698                 </fields>
4699                 <links>
4700                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4701                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4702                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4703                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4704                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4705                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4706                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4707                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4708                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4709                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4710                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4711                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4712                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4713                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4714                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4715                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4716                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4717                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4718                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4719                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4720                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4721                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4722                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4723                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4724                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4725                 </links>
4726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4727             <actions>
4728                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4729                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4730                     <context field="id"/>
4731                     <context field="parent_ou"/>
4732                                 </retrieve>
4733                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4734                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4735             </actions>
4736         </permacrud>
4737         </class>
4738         <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">
4739                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4740                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4741                         <field name="btype" reporter:datatype="text"/>
4742                         <field name="id" reporter:datatype="id" />
4743                         <field name="name"  reporter:datatype="text"/>
4744                         <field name="description" reporter:datatype="text"/>
4745                         <field name="owner" reporter:datatype="link"/>
4746                         <field name="pub" reporter:datatype="bool"/>
4747                         <field name="create_time" reporter:datatype="timestamp" />
4748                 </fields>
4749                 <links>
4750                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4751                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4752                 </links>
4753         </class>
4754         <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">
4755                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4756                         <field name="id" reporter:datatype="id" />
4757                         <field name="bucket" reporter:datatype="link"/>
4758                         <field name="note" reporter:datatype="text" />
4759                 </fields>
4760                 <links>
4761                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4762                 </links>
4763         </class>
4764         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4765                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4766                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4767                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4768                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4769                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4770                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4771                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4772                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4773                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4774                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4775                 </fields>
4776                 <links>
4777                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4778                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4779                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4780                 </links>
4781         </class>
4782         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4783                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4784                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4785                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4786                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4787                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4788                 </fields>
4789                 <links>
4790                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4791                 </links>
4792         </class>
4793     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
4794         <fields oils_persist:primary="field">
4795             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4796             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4797             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4798         </fields>
4799         <links/>
4800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4801             <actions>
4802                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4803                 <retrieve />
4804                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4805                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4806             </actions>
4807         </permacrud>
4808     </class>
4809         <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">
4810                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4811                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4812                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4813                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4814                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4815                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4816                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4817                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4818                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4819                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4820                 </fields>
4821                 <links>
4822                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4823                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4824                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4825                 </links>
4826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4827             <actions>
4828                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4829                 <retrieve />
4830                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4831                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4832             </actions>
4833         </permacrud>
4834         </class>
4835         <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">
4836                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4837                         <field name="field" reporter:datatype="link"/>
4838                         <field name="id" reporter:datatype="id" />
4839                         <field name="source" reporter:datatype="link"/>
4840                         <field name="value"  reporter:datatype="text"/>
4841                 </fields>
4842                 <links>
4843                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4844                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4845                 </links>
4846         </class>
4847         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4848                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4849                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4850                         <field name="btype" reporter:datatype="text"/>
4851                         <field name="id" reporter:datatype="id" />
4852                         <field name="name"  reporter:datatype="text"/>
4853                         <field name="description" reporter:datatype="text"/>
4854                         <field name="owner" reporter:datatype="link"/>
4855                         <field name="pub" reporter:datatype="bool"/>
4856                         <field name="create_time" reporter:datatype="timestamp" />
4857                 </fields>
4858                 <links>
4859                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4860                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4861                 </links>
4862         </class>
4863         <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">
4864                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4865                         <field name="id" reporter:datatype="id" />
4866                         <field name="bucket" reporter:datatype="link"/>
4867                         <field name="note" reporter:datatype="text" />
4868                 </fields>
4869                 <links>
4870                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4871                 </links>
4872         </class>
4873         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4874                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4875                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4876                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4877                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4878                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4879                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4880                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4881                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4882                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4883                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4884                 </fields>
4885                 <links>
4886                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4887                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4888                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4889                 </links>
4890         </class>
4891         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4892                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4893                         <field name="id" reporter:datatype="id" />
4894                         <field name="ind1" />
4895                         <field name="ind2" />
4896                         <field name="record" />
4897                         <field name="subfield" />
4898                         <field name="tag" />
4899                         <field name="value" />
4900                 </fields>
4901                 <links>
4902                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4903                 </links>
4904         </class>
4905         <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">
4906                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4907                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4908                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4909                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4910                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4911                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4912                 </fields>
4913                 <links>
4914                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4915                 </links>
4916         </class>
4917         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
4918                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4919                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4920                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4921                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4922                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4923                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4924                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4925                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4926                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4927                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4928                 </fields>
4929                 <links>
4930                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4931                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4932                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4933                 </links>
4934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4935             <actions>
4936                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4937                 <retrieve/>
4938                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4939                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4940             </actions>
4941         </permacrud>
4942         </class>
4943         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4944                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4945                         <field name="create_date" reporter:datatype="timestamp"/>
4946                         <field name="creator" reporter:datatype="link"/>
4947                         <field name="edit_date" reporter:datatype="timestamp"/>
4948                         <field name="editor" reporter:datatype="link"/>
4949                         <field name="id" reporter:datatype="id" />
4950                         <field name="pub" reporter:datatype="bool"/>
4951                         <field name="record" reporter:datatype="link"/>
4952                         <field name="value"  reporter:datatype="text"/>
4953                 </fields>
4954                 <links>
4955                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4956                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4957                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4958                 </links>
4959         </class>
4960         <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">
4961                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4962                         <field name="balance_owed" reporter:datatype="money" />
4963                         <field name="total_owed" reporter:datatype="money" />
4964                         <field name="total_paid" reporter:datatype="money" />
4965                         <field name="usr" reporter:datatype="link"/>
4966                 </fields>
4967                 <links>
4968                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4969                 </links>
4970         </class>
4971         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4972                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4973                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4974                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4975                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4976                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4977                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4978                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4979                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4980                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4981                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4982                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4983                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4984                 </fields>
4985                 <links>
4986                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4987                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4988                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4989                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4990                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4991                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4992                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4993                 </links>
4994         </class>
4995         <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">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4997                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4998                         <field name="quality" reporter:datatype="int" />
4999                         <field name="source" reporter:datatype="text"/>
5000                         <field name="transcendant" reporter:datatype="bool"/>
5001                         <field name="can_have_copies" reporter:datatype="bool"/>
5002                 </fields>
5003                 <links/>
5004         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5005             <actions>
5006                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5007                 <retrieve/>
5008                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5009                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5010             </actions>
5011         </permacrud>
5012         </class>
5013         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5014                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5015                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5016                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5017                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5018                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5019                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5020                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5021                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5022                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5023                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5024                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5025                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5026                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5027                 </fields>
5028                 <links>
5029                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5030                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5031                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5032                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5033                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5034                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5035                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5036                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5037                 </links>
5038         </class>
5039         <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">
5040                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5041                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5042                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5043                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5044                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5045                 </fields>
5046                 <links>
5047                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5048                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5049                 </links>
5050         </class>
5051         <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">
5052                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5053                         <field name="bucket" reporter:datatype="link"/>
5054                         <field name="id" reporter:datatype="id" />
5055                         <field name="target_user" reporter:datatype="link"/>
5056                         <field name="create_time" reporter:datatype="timestamp" />
5057                         <field name="pos" reporter:datatype="int" />
5058                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5059                 </fields>
5060                 <links>
5061                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5062                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5063             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5064                 </links>
5065         </class>
5066         <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">
5067                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5068                         <field name="id" reporter:datatype="id" />
5069                         <field name="item" reporter:datatype="link"/>
5070                         <field name="note" reporter:datatype="text" />
5071                 </fields>
5072                 <links>
5073                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5074                 </links>
5075         </class>
5076         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5077                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5078                         <field name="balance_owed" reporter:datatype="money" />
5079                         <field name="total_owed" reporter:datatype="money" />
5080                         <field name="total_paid" reporter:datatype="money" />
5081                         <field name="usr" reporter:datatype="link"/>
5082                 </fields>
5083                 <links>
5084                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5085                 </links>
5086         </class>
5087         <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">
5088                 <fields oils_persist:primary="code" oils_persist:sequence="">
5089                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5090                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5091                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5092                 </fields>
5093                 <links/>
5094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5095             <actions>
5096                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5097                 <retrieve/>
5098                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5099                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5100             </actions>
5101         </permacrud>
5102         </class>
5103         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5104                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5105                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5106                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5107                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5108                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5109                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5110                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5111                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5112                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5113                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5114                 </fields>
5115                 <links>
5116                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5117                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5118                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5119                 </links>
5120         </class>
5121         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5122                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5123                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5124                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5125                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5126                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5127                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5128                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5129                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5130                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5131                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5132                 </fields>
5133                 <links>
5134                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5135                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5136                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5137                 </links>
5138         </class>
5139         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="">
5141                         <field name="checkin_lib" reporter:datatype="link"/>
5142                         <field name="checkin_staff" reporter:datatype="link"/>
5143                         <field name="checkin_time" reporter:datatype="timestamp"/>
5144                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5145                         <field name="circ_staff" reporter:datatype="link"/>
5146                         <field name="desk_renewal" reporter:datatype="bool"/>
5147                         <field name="due_date" reporter:datatype="timestamp"/>
5148                         <field name="duration" reporter:datatype="interval"/>
5149                         <field name="duration_rule" reporter:datatype="link"/>
5150                         <field name="fine_interval" reporter:datatype="interval"/>
5151                         <field name="id" reporter:datatype="id" />
5152                         <field name="max_fine" reporter:datatype="money" />
5153                         <field name="max_fine_rule" reporter:datatype="link"/>
5154                         <field name="opac_renewal" reporter:datatype="bool"/>
5155                         <field name="phone_renewal" reporter:datatype="bool"/>
5156                         <field name="recurring_fine" reporter:datatype="money" />
5157                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5158                         <field name="renewal_remaining" reporter:datatype="int" />
5159             <field name="grace_period" reporter:datatype="interval" />
5160                         <field name="stop_fines" reporter:datatype="text"/>
5161                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5162                         <field name="target_copy" reporter:datatype="link"/>
5163                         <field name="usr" reporter:datatype="link"/>
5164                         <field name="xact_finish" reporter:datatype="timestamp" />
5165                         <field name="xact_start" reporter:datatype="timestamp" />
5166                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5167                 </fields>
5168                 <links>
5169                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5170                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5171                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5172                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5173                 </links>
5174         </class>
5175         <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">
5176                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5177                         <field name="field" reporter:datatype="link"/>
5178                         <field name="id" reporter:datatype="id" />
5179                         <field name="source" reporter:datatype="link"/>
5180                         <field name="value" reporter:datatype="text"/>
5181                 </fields>
5182                 <links>
5183                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5184                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5185                 </links>
5186         </class>
5187         <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">
5188                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5189                         <field name="high" reporter:datatype="money" />
5190                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5191                         <field name="low" reporter:datatype="money" />
5192                         <field name="name" reporter:datatype="text"/>
5193                         <field name="normal" reporter:datatype="money" />
5194                         <field name="recurrence_interval" reporter:datatype="interval"/>
5195             <field name="grace_period" reporter:datatype="interval" />
5196                 </fields>
5197                 <links/>
5198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5199             <actions>
5200                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5201                 <retrieve/>
5202                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5203                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5204             </actions>
5205         </permacrud>
5206         </class>
5207         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5208                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5209                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5210                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5211                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5212                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5213                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5214                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5215                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5216                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5217                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5218                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5219                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5220                 </fields>
5221                 <links>
5222                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5223                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5224                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5225                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5226                 </links>
5227         </class>
5228         <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">
5229                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5230                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5231                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5232                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5233                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5234                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5235                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5236                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5237                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5238                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5239                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5240                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5241                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5242                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5243                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5244                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5245                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5246                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5247                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5248                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5249                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5250                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5251                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5252                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5253                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5254                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5255                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5256                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5257                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5258                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5259                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5260                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5261                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5262                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5263                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5270                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5271                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5272                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5273                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5274                 </fields>
5275                 <links>
5276                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5277                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5278                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5279                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5280                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5281                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5282                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5283                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5284                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5285                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5286                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5287                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5288                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5289                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5290                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5291                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5292                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5293                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5294                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5295                 </links>
5296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5297             <actions>
5298                 <create permission="CREATE_COPY">
5299                     <context link="call_number" field="owning_lib"/>
5300                 </create>
5301                 <retrieve/>
5302                 <update permission="UPDATE_COPY">
5303                     <context link="call_number" field="owning_lib"/>
5304                 </update>
5305                 <delete permission="DELETE_COPY">
5306                     <context link="call_number" field="owning_lib"/>
5307                 </delete>
5308             </actions>
5309         </permacrud>
5310         </class>
5311
5312         <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">
5313                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5314                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5315                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5316                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5317                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5318                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5321                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5322                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5323                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5324                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5325                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5326                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5327                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5328                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5329                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5330                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5331                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5332                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5333                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5334                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5335                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5336                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5337                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5338                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5339                 </fields>
5340                 <links>
5341                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5342                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5343                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5344                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5345                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5346                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5347                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5348                 </links>
5349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5350                         <actions>
5351                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5352                                 <retrieve />
5353                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5354                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5355                         </actions>
5356                 </permacrud>
5357         </class>
5358
5359         <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
5360                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5361                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5362                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5363                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5364                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5365                 </fields>
5366                 <links/>
5367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5368             <actions>
5369                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5370                 <retrieve/>
5371                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5372                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5373             </actions>
5374         </permacrud>
5375         </class>
5376         <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">
5377                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5378                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5379                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5380                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5381                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5382                 </fields>
5383                 <links/>
5384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5385             <actions>
5386                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5387                 <retrieve/>
5388                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5389                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5390             </actions>
5391         </permacrud>
5392         </class>
5393         <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">
5394                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5395                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5396                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5397                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5398                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5399                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5400                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5401                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5402                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5403                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5404                 </fields>
5405                 <links>
5406                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5407                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5408                 </links>
5409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5410             <actions>
5411                 <create permission="CREATE_PERM" global_required="true"/>
5412                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5413                 <update permission="UPDATE_PERM" global_required="true"/>
5414                 <delete permission="DELETE_PERM" global_required="true"/>
5415             </actions>
5416         </permacrud>
5417         </class>
5418         <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">
5419                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5420                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5421                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5422                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5423                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5424                 </fields>
5425                 <links>
5426                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5427                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5428                 </links>
5429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5430             <actions>
5431                 <create permission="ADMIN_SURVEY">
5432                     <context link="question" jump="survey" field="owner"/>
5433                 </create>
5434                 <retrieve/>
5435                 <update permission="ADMIN_SURVEY">
5436                     <context link="question" jump="survey" field="owner"/>
5437                 </update>
5438                 <delete permission="ADMIN_SURVEY">
5439                     <context link="question" jump="survey" field="owner"/>
5440                 </delete>
5441             </actions>
5442         </permacrud>
5443         </class>
5444         <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">
5445                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5446                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5447                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5448                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5449                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5450                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5451                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5452                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5453                 </fields>
5454                 <links>
5455                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5456                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5457                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5458                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5459                 </links>
5460         </class>
5461         <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">
5462                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5463                         <field name="balance_owed" reporter:datatype="money" />
5464                         <field name="total_owed" reporter:datatype="money" />
5465                         <field name="total_paid" reporter:datatype="money" />
5466                         <field name="usr" reporter:datatype="link"/>
5467                 </fields>
5468                 <links>
5469                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5470                 </links>
5471         </class>
5472         <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">
5473                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5474                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5475                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5476                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5477                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5478                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5479                 </fields>
5480                 <links>
5481                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5482                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5483                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5484                 </links>
5485         </class>
5486         <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">
5487                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5488                         <field name="field" reporter:datatype="link"/>
5489                         <field name="id" reporter:datatype="id" />
5490                         <field name="source" reporter:datatype="link"/>
5491                         <field name="value" reporter:datatype="text"/>
5492                 </fields>
5493                 <links>
5494                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5495                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5496                 </links>
5497         </class>
5498         <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">
5499                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5500                         <field name="field" reporter:datatype="link"/>
5501                         <field name="id" reporter:datatype="id" />
5502                         <field name="source" reporter:datatype="link"/>
5503                         <field name="value" reporter:datatype="text"/>
5504                 </fields>
5505                 <links>
5506                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5507                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5508                 </links>
5509         </class>
5510         <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">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5512                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5513                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5514                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5515                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5516                 </fields>
5517                 <links>
5518                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5519                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5520                 </links>
5521         </class>
5522         <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">
5523                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5524                         <field name="depth" reporter:datatype="int" />
5525                         <field name="grantable" reporter:datatype="bool"/>
5526                         <field name="grp" reporter:datatype="link"/>
5527                         <field name="id" reporter:datatype="id" />
5528                         <field name="perm" reporter:datatype="link"/>
5529                 </fields>
5530                 <links>
5531                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5532                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5533                 </links>
5534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5535             <actions>
5536                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5537                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5538                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5539                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5540             </actions>
5541         </permacrud>
5542         </class>
5543         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5544                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5545                         <field name="items" oils_persist:virtual="true" />
5546                         <field name="btype" reporter:datatype="text"/>
5547                         <field name="id" reporter:datatype="id" />
5548                         <field name="name" reporter:datatype="text"/>
5549                         <field name="description" reporter:datatype="text"/>
5550                         <field name="owner" reporter:datatype="link"/>
5551                         <field name="pub" reporter:datatype="bool"/>
5552                         <field name="create_time" reporter:datatype="timestamp" />
5553                 </fields>
5554                 <links>
5555                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5556                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5557                 </links>
5558         </class>
5559         <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">
5560                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5561                         <field name="id" reporter:datatype="id" />
5562                         <field name="bucket" reporter:datatype="link"/>
5563                         <field name="note" reporter:datatype="text" />
5564                 </fields>
5565                 <links>
5566                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5567                 </links>
5568         </class>
5569         <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">
5570                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5571                         <field name="id" reporter:datatype="int" />
5572                         <field name="usr" reporter:datatype="link"/>
5573                         <field name="work_ou" reporter:datatype="link"/>
5574                 </fields>
5575                 <links>
5576                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5577                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5578                 </links>
5579         </class>
5580         <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">
5581                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5582                         <field name="depth" reporter:datatype="int"/>
5583                         <field name="grantable" reporter:datatype="bool"/>
5584                         <field name="id" reporter:datatype="id" />
5585                         <field name="perm" reporter:datatype="link"/>
5586                         <field name="usr" reporter:datatype="link"/>
5587                 </fields>
5588                 <links>
5589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5590                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5591                 </links>
5592         </class>
5593         <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">
5594                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5595                         <field name="object_id" reporter:datatype="text"/>
5596                         <field name="grantable" reporter:datatype="bool"/>
5597                         <field name="id" reporter:datatype="id" />
5598                         <field name="perm" reporter:datatype="link"/>
5599                         <field name="usr" reporter:datatype="link"/>
5600                         <field name="object_type" reporter:datatype="text"/>
5601                 </fields>
5602                 <links>
5603                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5604                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5605                 </links>
5606         </class>
5607         <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">
5608                 <fields oils_persist:primary="id" oils_persist:sequence="">
5609                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5610                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5611                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5612                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5613                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5614                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5615                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5616                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5617                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5618                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5619                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5620                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5621                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5622                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5623                 </fields>
5624                 <links>
5625                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5626                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5627                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5628                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5629                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5630                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5631                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5632                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5633                 </links>
5634         </class>
5635         <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">
5636                 <fields oils_persist:primary="id" oils_persist:sequence="">
5637                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5638                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5639                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5640                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5641                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5642                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5643                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5644                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5645                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5646                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5647                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5648                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5649                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5650                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5651                 </fields>
5652                 <links>
5653                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5654                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5655                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5656                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5657                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5658                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5659                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5660                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5661                 </links>
5662         </class>
5663         <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">
5664                 <fields oils_persist:primary="id" oils_persist:sequence="">
5665                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5666                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5667                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5668                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5669                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5670                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5671                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5672                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5673                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5674                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5675                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5676                 </fields>
5677                 <links>
5678                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5679                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5680                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5681                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5682                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5683                 </links>
5684         </class>
5685         <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">
5686                 <fields oils_persist:primary="id" oils_persist:sequence="">
5687                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5688                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5689                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5690                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5692                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5693                         <field reporter:label="Accepting User" name="accepting_usr" />
5694                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5695                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5696                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5697                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5698                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5699                 </fields>
5700                 <links>
5701                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5702                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5703                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5704                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5705                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5706                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5707                 </links>
5708         </class>
5709         <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">
5710                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5711                         <field name="bucket" reporter:datatype="link"/>
5712                         <field name="id" reporter:datatype="id" />
5713                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5714                         <field name="create_time" reporter:datatype="timestamp" />
5715                         <field name="pos" reporter:datatype="int" />
5716                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5717                 </fields>
5718                 <links>
5719                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5720                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5721             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5722                 </links>
5723         </class>
5724         <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">
5725                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5726                         <field name="id" reporter:datatype="id" />
5727                         <field name="item" reporter:datatype="link"/>
5728                         <field name="note" reporter:datatype="text" />
5729                 </fields>
5730                 <links>
5731                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5732                 </links>
5733         </class>
5734         <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">
5735                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5736                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5737                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5738                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5739                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5740                 </fields>
5741                 <links>
5742                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5743                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5744                 </links>
5745         </class>
5746     <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
5747         <fields oils_persist:primary="field">
5748             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5749             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5750             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5751         </fields>
5752         <links/>
5753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5754             <actions>
5755                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5756                 <retrieve />
5757                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5758                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5759             </actions>
5760         </permacrud>
5761     </class>
5762         <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">
5763                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5764                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5765                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5766                 </fields>
5767                 <links/>
5768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5769             <actions>
5770                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5771                 <retrieve/>
5772                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5773                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5774             </actions>
5775         </permacrud>
5776         </class>
5777
5778
5779         <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">
5780                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5781                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5782                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5783                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5784                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5785                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5786                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5787                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5788                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5789                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5790                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5791                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5792                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5793                 </fields>
5794                 <links>
5795                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5796                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5797                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5798                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5799                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5800                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5801                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5802                 </links>
5803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5804             <actions>
5805                 <create permission="TRANSIT_COPY">
5806                     <context link="target_copy" field="owner"/>
5807                 </create>
5808                 <retrieve/>
5809                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5810                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5811             </actions>
5812         </permacrud>
5813         </class>
5814         <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">
5815                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5816                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5817                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5818                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5819                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5820                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5821                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5822                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5823                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5824                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5825                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5826                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5827                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5828                 </fields>
5829                 <links>
5830                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5831                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5832                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5833                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5834                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5835                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5836                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5837                 </links>
5838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5839             <actions>
5840                 <create permission="TRANSIT_COPY" context_field="owner">
5841                     <context link="target_copy" field="circ_lib"/>
5842                 </create>
5843                 <retrieve/>
5844                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5845                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5846             </actions>
5847         </permacrud>
5848         </class>
5849         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5850                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5851                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5852                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5853                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5854                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5855                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5856                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5857                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5858                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5859                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5860                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5861                 </fields>
5862                 <links>
5863                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5864                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5865                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5866                 </links>
5867         </class>
5868         <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">
5869                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5870                         <field name="grp" />
5871                         <field name="id" reporter:datatype="id" />
5872                         <field name="usr" />
5873                 </fields>
5874                 <links>
5875                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5876                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5877                 </links>
5878         </class>
5879         <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">
5880                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5881                         <field name="id" reporter:datatype="id" />
5882                         <field name="fq_field" reporter:datatype="text"/>
5883                         <field name="identity_value" reporter:datatype="text"/>
5884                         <field name="translation" reporter:datatype="text"/>
5885                         <field name="string" reporter:datatype="text"/>
5886                 </fields>
5887                 <links>
5888                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5889                 </links>
5890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5891             <actions>
5892                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5893                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5894                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5895                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5896             </actions>
5897         </permacrud>
5898         </class>
5899         <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">
5900                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5901                         <field name="id" reporter:datatype="id" />
5902                         <field name="fm_class" reporter:datatype="text"/>
5903                         <field name="field" reporter:datatype="text"/>
5904                         <field name="owner" reporter:datatype="org_unit"/>
5905                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5906                 </fields>
5907                 <links>
5908                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5909                 </links>
5910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5911             <actions>
5912                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5913                 <retrieve/>
5914                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5915                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5916             </actions>
5917         </permacrud>
5918         </class>
5919         <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">
5920                 <fields oils_persist:primary="code">
5921                         <field name="code" reporter:datatype="id" />
5922                         <field name="marc_code" reporter:datatype="text"/>
5923                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5924                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5925                 </fields>
5926                 <links/>
5927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5928             <actions>
5929                 <create permission="CREATE_LOCALE" global_required="true"/>
5930                 <retrieve/>
5931                 <update permission="UPDATE_LOCALE" global_required="true"/>
5932                 <delete permission="DELETE_LOCALE" global_required="true"/>
5933             </actions>
5934         </permacrud>
5935         </class>
5936         <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">
5937                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5938                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5939                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5940                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5941             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5942                 </fields>
5943                 <links>
5944                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5945                 </links>
5946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5947             <actions>
5948                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5949                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5950                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5951                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5952             </actions>
5953         </permacrud>
5954         </class>
5955
5956         <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">
5957                 <fields oils_persist:primary="id">
5958                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5959                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5960                 </fields>
5961                 <links/>
5962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5963             <actions>
5964                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5965                 <retrieve/>
5966                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5967                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5968             </actions>
5969         </permacrud>
5970         </class>
5971
5972         <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">
5973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5974                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5975                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5976                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
5977                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5978                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5979                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5980                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5981                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5982                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5983                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5984                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5985                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5986                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5987                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5988                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5989                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5990                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5991                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5992                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5993                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5994                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5995                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5996                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5997                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5998                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5999                 </fields>
6000                 <links>
6001                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6002                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6003                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6004                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6005                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6006                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6007                 </links>
6008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6009             <actions>
6010                 <create permission="user_request.create">
6011                     <context link="usr" field="home_ou"/>
6012                                 </create>
6013                 <retrieve permission="user_request.view">
6014                     <context link="usr" field="home_ou"/>
6015                                 </retrieve>
6016                 <update permission="user_request.update">
6017                     <context link="usr" field="home_ou"/>
6018                                 </update>
6019                 <delete permission="user_request.delete">
6020                     <context link="usr" field="home_ou"/>
6021                                 </delete>
6022             </actions>
6023         </permacrud>
6024         </class>
6025
6026         <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">
6027                 <fields oils_persist:primary="code">
6028                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6029                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6030                 </fields>
6031                 <links/>
6032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6033             <actions>
6034                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6035                 <retrieve/>
6036                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6037                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6038             </actions>
6039         </permacrud>
6040         </class>
6041
6042         <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">
6043                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6044                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6045                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6046                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6047                         <field reporter:label="Ratio" name="ratio" />
6048                 </fields>
6049                 <links>
6050                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6051                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6052                 </links>
6053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6054                         <actions>
6055                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6056                                 <retrieve/>
6057                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6058                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6059                         </actions>
6060                 </permacrud>
6061         </class>
6062
6063         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6064                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6065                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6066                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6067                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6068                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6069                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6070                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6071                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6072                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6073                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6074                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6075                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6076                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6077                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6078                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6079                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6080                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6081                 </fields>
6082                 <links>
6083                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6084                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6085             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6086             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6087             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6088                 </links>
6089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6090             <actions>
6091                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6092                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6093                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6094                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6095             </actions>
6096         </permacrud>
6097         </class>
6098
6099         <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">
6100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6101                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6102                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6103                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6104                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6105                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6106                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6107                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6108                 </fields>
6109                 <links>
6110                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6111                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6112                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6113                 </links>
6114         </class>
6115
6116         <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">
6117                 <fields oils_persist:primary="code">
6118                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6119                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6120                 </fields>
6121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6122             <actions>
6123                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6124                 <retrieve/>
6125                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6126                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6127             </actions>
6128                 </permacrud>
6129         </class>
6130
6131         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6132                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6133                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6134                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6135                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6136                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6137                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6138                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6139                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6140                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6141                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6142                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6143                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6144                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6145                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6146                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6147                 </fields>
6148                 <links>
6149                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6150                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6151                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6152                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6153                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6154                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6155                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6156                 </links>
6157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6158             <actions>
6159                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6160                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6161                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6162                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6163             </actions>
6164         </permacrud>
6165         </class>
6166
6167         <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">
6168                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6169                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6170                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6171                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6172                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6173                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6174                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6175                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6176                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6177                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6178                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6179                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6180                 </fields>
6181                 <links>
6182                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6183                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6184                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6185                 </links>
6186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6187             <actions>
6188                 <create   permission="ADMIN_INVOICE">
6189                                         <context link="invoice" field="receiver"/>
6190                                 </create>
6191                 <retrieve permission="ADMIN_INVOICE">
6192                                         <context link="invoice" field="receiver"/>
6193                                 </retrieve>
6194                 <update   permission="ADMIN_INVOICE">
6195                                         <context link="invoice" field="receiver"/>
6196                                 </update>
6197                                 <delete   permission="ADMIN_INVOICE">
6198                                         <context link="invoice" field="receiver"/>
6199                                 </delete>
6200             </actions>
6201         </permacrud>
6202         </class>
6203
6204         <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">
6205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6206                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6207                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6208                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6209                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6210                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6211                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6212                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6213                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6214                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6215                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6216                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6217                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6218                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6219                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6220                 </fields>
6221                 <links>
6222                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6223                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6224                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6225                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6226                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6227                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6228                 </links>
6229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6230             <actions>
6231                 <create   permission="ADMIN_INVOICE">
6232                                         <context link="invoice" field="receiver"/>
6233                                 </create>
6234                 <retrieve permission="ADMIN_INVOICE">
6235                                         <context link="invoice" field="receiver"/>
6236                                 </retrieve>
6237                 <update   permission="ADMIN_INVOICE">
6238                                         <context link="invoice" field="receiver"/>
6239                                 </update>
6240                                 <delete   permission="ADMIN_INVOICE">
6241                                         <context link="invoice" field="receiver"/>
6242                                 </delete>
6243             </actions>
6244         </permacrud>
6245         </class>
6246
6247         <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">
6248                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6249                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6250                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6251                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6252                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6253                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6254                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6255                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6256                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6257                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6258                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6259                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6260                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6261                 </fields>
6262                 <links>
6263                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6264                 </links>
6265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6266             <actions>
6267                 <create permission="ADMIN_PROVIDER">
6268                     <context link="provider" field="owner"/>
6269                 </create>
6270                 <retrieve permission="ADMIN_PROVIDER">
6271                     <context link="provider" field="owner"/>
6272                 </retrieve>
6273                 <update permission="ADMIN_PROVIDER">
6274                     <context link="provider" field="owner"/>
6275                 </update>
6276                 <delete permission="ADMIN_PROVIDER">
6277                     <context link="provider" field="owner"/>
6278                 </delete>
6279             </actions>
6280         </permacrud>
6281         </class>
6282
6283         <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">
6284                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6285                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6286                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6287                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6288                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6289                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6290                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6291         </fields>
6292                 <links>
6293                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6294                 </links>
6295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6296             <actions>
6297                 <create permission="ADMIN_PROVIDER">
6298                     <context link="provider" field="owner"/>
6299                 </create>
6300                 <retrieve permission="ADMIN_PROVIDER">
6301                     <context link="provider" field="owner"/>
6302                 </retrieve>
6303                 <update permission="ADMIN_PROVIDER">
6304                     <context link="provider" field="owner"/>
6305                 </update>
6306                 <delete permission="ADMIN_PROVIDER">
6307                     <context link="provider" field="owner"/>
6308                 </delete>
6309             </actions>
6310         </permacrud>
6311     </class>
6312         <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">
6313                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6314                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6315                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6316                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6317                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6318                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6319                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6320                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6321                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6322                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6323                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6324                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6325                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6326                 </fields>
6327                 <links>
6328                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6329                 </links>
6330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6331             <actions>
6332                 <create permission="ADMIN_PROVIDER">
6333                     <context link="contact" jump='provider' field="owner"/>
6334                 </create>
6335                 <retrieve permission="ADMIN_PROVIDER">
6336                     <context link="contact" jump='provider' field="owner"/>
6337                 </retrieve>
6338                 <update permission="ADMIN_PROVIDER">
6339                     <context link="contact" jump='provider' field="owner"/>
6340                 </update>
6341                 <delete permission="ADMIN_PROVIDER">
6342                     <context link="contact" jump='provider' field="owner"/>
6343                 </delete>
6344             </actions>
6345         </permacrud>
6346         </class>
6347
6348         <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">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6350                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6351                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6352                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6353                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6354                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6355                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6356                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6357                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6358                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6359                 </fields>
6360                 <links>
6361                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6362                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6363                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6364                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6365                 </links>
6366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6367                 </permacrud>
6368         </class>
6369
6370         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6371                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6372                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6373                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6374                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6375                 </fields>
6376                 <links>
6377             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6378                 </links>
6379                 <!--
6380                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6381                         But here's what it should look like if we ever do use pcrud.
6382                 -->
6383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6384                         <actions>
6385                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6386                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6387                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6388                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6389                         </actions>
6390                 </permacrud>
6391         </class>
6392
6393         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6394                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6395                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6396                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6397                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6398                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6399                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6400                 </fields>
6401                 <links>
6402                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6403                 </links>
6404                 <!--
6405                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6406                         But here's what it should look like if we ever do use pcrud.
6407                 -->
6408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6409                         <actions>
6410                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6411                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6412                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6413                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6414                         </actions>
6415                 </permacrud>
6416         </class>
6417
6418         <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">
6419                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6420                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6421                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6422                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6423                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6424                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6425                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6426                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6427                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6428                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6429                 </fields>
6430                 <links>
6431                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6432                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6433             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6434             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6435                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6436                 </links>
6437         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6438             <actions>
6439                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6440                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6441                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6442                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6443             </actions>
6444         </permacrud>
6445         </class>
6446
6447         <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">
6448                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6449                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6450                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6451                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6452                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6453                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6454                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6455                 </fields>
6456                 <links>
6457                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6458                 </links>
6459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6460                         <actions>
6461                                 <create permission="ADMIN_FUNDING_SOURCE">
6462                     <context link="funding_source" field="owner"/>
6463                 </create>
6464                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6465                     <context link="funding_source" field="owner"/>
6466                 </retrieve>
6467                                 <update permission="ADMIN_FUNDING_SOURCE">
6468                     <context link="funding_source" field="owner"/>
6469                 </update>
6470                                 <delete permission="ADMIN_FUNDING_SOURCE">
6471                     <context link="funding_source" field="owner"/>
6472                 </delete>
6473                         </actions>
6474                 </permacrud>
6475         </class>
6476
6477         <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">
6478                 <fields oils_persist:primary="id">
6479                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6480                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6481                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6482                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6483                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6484                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6485                 </fields>
6486                 <links>
6487                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6488                 </links>
6489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6490                 </permacrud>
6491         </class>
6492
6493         <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">
6494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6495                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6496                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6497                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6498                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6499                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6500                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6501                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6502                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6503                 </fields>
6504                 <links>
6505                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6506                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6507                 </links>
6508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6509                         <actions>
6510                                 <create permission="ADMIN_ACQ_FUND">
6511                     <context link="fund" field="org"/>
6512                 </create>
6513                                 <retrieve permission="ADMIN_ACQ_FUND">
6514                     <context link="fund" field="org"/>
6515                 </retrieve>
6516                                 <update permission="ADMIN_ACQ_FUND">
6517                     <context link="fund" field="org"/>
6518                 </update>
6519                                 <delete permission="ADMIN_ACQ_FUND">
6520                     <context link="fund" field="org"/>
6521                 </delete>
6522                         </actions>
6523                 </permacrud>
6524         </class>
6525
6526         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6527                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6528                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6529                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6530                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6531                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6532                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6533                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6534                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6535                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6536                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6537                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6538                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6539                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6540                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6541                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6542                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6543                 </fields>
6544                 <links>
6545                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6546                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6547             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6548             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6549             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6550                 </links>
6551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6552             <actions>
6553                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6554                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6555                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6556                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6557             </actions>
6558         </permacrud>
6559         </class>
6560
6561         <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">
6562                 <fields oils_persist:primary="fund">
6563                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6564                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6565                 </fields>
6566                 <links>
6567                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6568                 </links>
6569         </class>
6570
6571         <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">
6572                 <fields oils_persist:primary="fund">
6573                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6574                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6575                 </fields>
6576                 <links>
6577                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6578                 </links>
6579         </class>
6580
6581         <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">
6582                 <fields oils_persist:primary="fund">
6583                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6584                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6585                 </fields>
6586                 <links>
6587                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6588                 </links>
6589         </class>
6590
6591         <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">
6592                 <fields oils_persist:primary="fund">
6593                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6594                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6595                 </fields>
6596                 <links>
6597                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6598                 </links>
6599         </class>
6600
6601         <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">
6602                 <fields oils_persist:primary="fund">
6603                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6604                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6605                 </fields>
6606                 <links>
6607                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6608                 </links>
6609         </class>
6610
6611    <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">
6612         <fields oils_persist:primary="fund">
6613             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6614             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6615         </fields>
6616         <links>
6617             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6618         </links>
6619     </class>
6620
6621    <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">
6622         <fields oils_persist:primary="fund">
6623             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6624             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6625         </fields>
6626         <links>
6627             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6628         </links>
6629     </class>
6630
6631    <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">
6632         <fields oils_persist:primary="fund">
6633             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6634             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6635         </fields>
6636         <links>
6637             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6638         </links>
6639     </class>
6640
6641    <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">
6642         <fields oils_persist:primary="fund">
6643             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6644             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6645         </fields>
6646         <links>
6647             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6648         </links>
6649     </class>
6650
6651    <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">
6652         <fields oils_persist:primary="fund">
6653             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6654             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6655         </fields>
6656         <links>
6657             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6658         </links>
6659     </class>
6660
6661         <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">
6662                 <fields oils_persist:primary="funding_source">
6663                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6664                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6665                 </fields>
6666                 <links>
6667                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6668                 </links>
6669         </class>
6670
6671         <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">
6672                 <fields oils_persist:primary="funding_source">
6673                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6674                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6675                 </fields>
6676                 <links>
6677                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6678                 </links>
6679         </class>
6680
6681         <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">
6682                 <fields oils_persist:primary="funding_source">
6683                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6684                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6685                 </fields>
6686                 <links>
6687                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6688                 </links>
6689         </class>
6690
6691         <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">
6692                 <fields oils_persist:primary="fund">
6693                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6694                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6695                 </fields>
6696                 <links>
6697                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6698                 </links>
6699         </class>
6700
6701         <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">
6702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6703                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6704                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6705                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6706                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6707                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6708                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6709                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6710                 </fields>
6711                 <links>
6712                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6713                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6714                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6715                 </links>
6716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6717                         <actions>
6718                                 <create permission="ADMIN_ACQ_FUND">
6719                     <context link="fund" field="org"/>
6720                 </create>
6721                                 <retrieve permission="ADMIN_ACQ_FUND">
6722                     <context link="fund" field="org"/>
6723                 </retrieve>
6724                                 <update permission="ADMIN_ACQ_FUND">
6725                     <context link="fund" field="org"/>
6726                 </update>
6727                                 <delete permission="ADMIN_ACQ_FUND">
6728                     <context link="fund" field="org"/>
6729                 </delete>
6730                         </actions>
6731                 </permacrud>
6732         </class>
6733
6734     <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">
6735         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6736             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6737             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6738             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6739             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6740             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6741             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6742             <field reporter:label="Note" name="note" reporter:datatype="text" />
6743             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6744         </fields>
6745         <links>
6746             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6747             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6748             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6749         </links>
6750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6751                         <actions>
6752                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6753                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6754                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6755                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6756                         </actions>
6757                 </permacrud>
6758     </class>
6759
6760         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6762                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6763                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6764                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6765                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6766                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6767                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6768                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6769                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6770                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6771                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6772                 </fields>
6773                 <links>
6774                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6775                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6776                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6777                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6778                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6779                 </links>
6780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6781                         <actions>
6782                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6783                         </actions>
6784                 </permacrud>
6785         </class>
6786
6787         <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">
6788                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6789                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6790                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6791                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6792                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6793                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6794                 </fields>
6795                 <links>
6796                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6797                 </links>
6798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6799                         <actions>
6800                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6801                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6802                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6803                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6804                         </actions>
6805                 </permacrud>
6806         </class>
6807
6808         <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">
6809                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6810                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6811                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6812                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6813                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6814                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6815                         <field reporter:label="State" name="state" reporter:datatype="text" />
6816                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6817                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6818                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6819                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6820                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6821                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6822                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6823                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6824                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6825                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6826                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6827                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6828                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6829                 </fields>
6830                 <links>
6831                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6832                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6833                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6834                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6835                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6836                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6837                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6838                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6839                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6840                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6841                 </links>
6842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6843                         <actions>
6844                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6845                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6846                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6847                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6848                         </actions>
6849                 </permacrud>
6850         </class>
6851
6852         <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">
6853                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6854                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6855                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6856                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6857                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6858                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6859                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6860                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6861                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6862                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6863                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6864                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6865                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6866                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6867                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6868                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6869                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6870                 </fields>
6871                 <links>
6872                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6873                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6874                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6875                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6876                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6877                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6878                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6879                 </links>
6880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6881             <actions>
6882                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6883             </actions>
6884                 </permacrud>
6885         </class>
6886
6887         <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">
6888                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6889                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6890                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6891                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6892                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6893                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6894                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6895                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6896                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6897                 </fields>
6898                 <links>
6899                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6900                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6901                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6902                 </links>
6903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6904             <actions>
6905                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6906                     <context link="purchase_order" field="ordering_agency"/>
6907                 </retrieve>
6908                 <create permission="CREATE_PURCHASE_ORDER">
6909                     <context link="purchase_order" field="ordering_agency"/>
6910                 </create>
6911                 <update permission="CREATE_PURCHASE_ORDER">
6912                     <context link="purchase_order" field="ordering_agency"/>
6913                 </update>
6914                 <delete permission="CREATE_PURCHASE_ORDER">
6915                     <context link="purchase_order" field="ordering_agency"/>
6916                 </delete>
6917             </actions>
6918                 </permacrud>
6919         </class>
6920
6921         <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">
6922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6923                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6924                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6925                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6926                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6927                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6928                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6929                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6930                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6931                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6932                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6933                 </fields>
6934                 <links>
6935                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6936                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6937                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6938                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6939                 </links>
6940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6941             <actions>
6942                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6943                     <context link="purchase_order" field="ordering_agency"/>
6944                 </retrieve>
6945                 <create permission="CREATE_PURCHASE_ORDER">
6946                     <context link="purchase_order" field="ordering_agency"/>
6947                 </create>
6948                 <update permission="CREATE_PURCHASE_ORDER">
6949                     <context link="purchase_order" field="ordering_agency"/>
6950                 </update>
6951                 <delete permission="CREATE_PURCHASE_ORDER">
6952                     <context link="purchase_order" field="ordering_agency"/>
6953                 </delete>
6954             </actions>
6955                 </permacrud>
6956         </class>
6957
6958         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6959                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6960                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6961                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6962                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6963                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6964                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6965                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6966                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6967                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6968                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6969                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6970                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6971                         <field reporter:label="State" name="state" reporter:datatype="text" />
6972                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6973                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6974                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6975                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6976                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6977                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6978                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6979                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6980                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6981                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6982                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6983                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6984                 </fields>
6985                 <links>
6986                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6987                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6988                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6989                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6990                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6991                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6992                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6993                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6994                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6995                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6996                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6997                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6998                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6999                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7000                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7001                 </links>
7002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7003                         <actions>
7004                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7005                                         <context link="purchase_order" field="ordering_agency"/>
7006                                         <context link="picklist" field="org_unit"/>
7007                                 </retrieve>
7008                         </actions>
7009                 </permacrud>
7010         </class>
7011
7012         <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">
7013                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7014                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7015                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7016                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7017                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7018                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7019                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7020                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7021                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7022                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7023                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7024                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7025                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7026                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7027                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7028                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7029                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7030                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7031                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7032                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7033                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7034                 </fields>
7035                 <links>
7036                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7037                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7038                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7039                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7040                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7041                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7042                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7043                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7044                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7045                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7046                 </links>
7047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7048                         <actions>
7049                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7050                                         <context link="purchase_order" field="ordering_agency"/>
7051                                         <context link="picklist" field="org_unit"/>
7052                                 </retrieve>
7053                         </actions>
7054                 </permacrud>
7055         </class>
7056
7057         <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">
7058                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7059                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7060                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7061                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7062                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7063                 </fields>
7064                 <links>
7065                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7066                 </links>
7067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7068                         <actions>
7069                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7070                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7071                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7072                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7073                         </actions>
7074                 </permacrud>
7075         </class>
7076
7077         <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">
7078                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7079                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7080                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7081                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7082                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7083                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7084                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7085                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7086                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7087                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7088                 </fields>
7089                 <links>
7090                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7091                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7092                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7093                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7094                 </links>
7095         </class>
7096
7097         <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">
7098                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7099                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7100                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7101                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7102                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7103                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7104                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7105                 </fields>
7106                 <links>
7107                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7108                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7109                 </links>
7110         </class>
7111
7112         <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">
7113                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7114                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7115                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7116                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7117                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7118                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7119                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7120                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7121                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7122                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7123                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7124                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7125                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7126                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7127                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7128                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7129                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7130                 </fields>
7131                 <links>
7132                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7133                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7134                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7135                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7136                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7137                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7138                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7139                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7140                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7141                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7142                 </links>
7143         </class>
7144
7145         <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">
7146                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7147                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7148                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7149                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7150                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7151                 </fields>
7152                 <links/>
7153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7154                         <actions>
7155                                 <retrieve />
7156                         </actions>
7157                 </permacrud>
7158         </class>
7159
7160         <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">
7161                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7162                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7163                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7164                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7165                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7166                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7167             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7168                 </fields>
7169                 <links/>
7170         <permacrud>
7171             <actions>
7172                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7173                 <retrieve />
7174                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7175                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7176             </actions>
7177         </permacrud>
7178         </class>
7179
7180         <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">
7181                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7182                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7183                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7184                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7185                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7186                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7187                 </fields>
7188                 <links/>
7189         </class>
7190         <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">
7191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7192                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7193                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7194                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7195                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7196                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7197                 </fields>
7198                 <links>
7199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7200                 </links>
7201         </class>
7202
7203         <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">
7204             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7205                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7206                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7207                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7208                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7209                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7210                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7211         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7212
7213             </fields>
7214             <links>
7215                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7216             </links>
7217             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7218                 <actions>
7219                     <create permission="ADMIN_PROVIDER">
7220                         <context link="provider" field="owner"/>
7221                     </create>
7222                     <retrieve permission="ADMIN_PROVIDER">
7223                         <context link="provider" field="owner"/>
7224                     </retrieve>
7225                     <update permission="ADMIN_PROVIDER">
7226                         <context link="provider" field="owner"/>
7227                     </update>
7228                     <delete permission="ADMIN_PROVIDER">
7229                         <context link="provider" field="owner"/>
7230                     </delete>
7231                 </actions>
7232             </permacrud>
7233         </class>
7234         
7235         <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">
7236             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7237                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7238                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7239                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7240                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7241             </fields>
7242             <links>
7243                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7244             </links>
7245             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7246                 <actions>
7247                     <create permission="ADMIN_PROVIDER">
7248                         <context link="provider" field="owner"/>
7249                     </create>
7250                     <retrieve permission="ADMIN_PROVIDER">
7251                         <context link="provider" field="owner"/>
7252                     </retrieve>
7253                     <update permission="ADMIN_PROVIDER">
7254                         <context link="provider" field="owner"/>
7255                     </update>
7256                     <delete permission="ADMIN_PROVIDER">
7257                         <context link="provider" field="owner"/>
7258                     </delete>
7259                 </actions>
7260             </permacrud>
7261         </class>
7262         
7263         <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">
7264             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7265                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7266                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7267                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7268                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7269                 </fields>
7270                 <links/>
7271         </class>
7272
7273         <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">
7274                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7275                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7276                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7277                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7278                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7279                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7280                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7281                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7282                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7283                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7284                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7285                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7286                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7287                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7288                 </fields>
7289                 <links>
7290                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7291                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7292                 </links>
7293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7294             <actions>
7295                 <create permission="ADMIN_PROVIDER">
7296                     <context link="provider" field="owner"/>
7297                 </create>
7298                 <retrieve permission="ADMIN_PROVIDER">
7299                     <context link="provider" field="owner"/>
7300                 </retrieve>
7301                 <update permission="ADMIN_PROVIDER">
7302                     <context link="provider" field="owner"/>
7303                 </update>
7304                 <delete permission="ADMIN_PROVIDER">
7305                     <context link="provider" field="owner"/>
7306                 </delete>
7307             </actions>
7308         </permacrud>
7309         </class>
7310
7311         <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">
7312                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7313                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7314                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7315                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7316                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7317                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7318                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7319                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7320                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7321                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7322                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7323                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7324                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7325                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7326                 </fields>
7327                 <links>
7328                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7329                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7330                 </links>
7331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7332             <actions>
7333                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7334                     <context link="account" jump="provider" field="owner"/>
7335                 </retrieve>
7336                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7337                     <context link="account" jump="provider" field="owner"/>
7338                 </update>
7339                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7340                     <context link="account" jump="provider" field="owner"/>
7341                 </delete>
7342             </actions>
7343         </permacrud>
7344         </class>
7345
7346
7347         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7349                         <field name="id" reporter:datatype="id" />
7350                         <field name="parent" reporter:datatype="link"/>
7351                         <field name="owner" reporter:datatype="link"/>
7352                         <field name="create_time" reporter:datatype="timestamp"/>
7353                         <field name="name" reporter:datatype="text"/>
7354                         <field name="shared" reporter:datatype="bool"/>
7355                         <field name="share_with" reporter:datatype="link"/>
7356                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7357                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7358                 </fields>
7359                 <links>
7360                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7361                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7362                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7363                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7364                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7365                 </links>
7366         </class>
7367         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7368                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7369                         <field name="id" reporter:datatype="id" />
7370                         <field name="parent" reporter:datatype="link"/>
7371                         <field name="owner" reporter:datatype="link"/>
7372                         <field name="create_time" reporter:datatype="timestamp"/>
7373                         <field name="name" reporter:datatype="text"/>
7374                         <field name="shared" reporter:datatype="bool"/>
7375                         <field name="share_with" reporter:datatype="link"/>
7376                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7377                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7378                 </fields>
7379                 <links>
7380                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7381                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7382                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7383                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7384                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7385                 </links>
7386         </class>
7387         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7388                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7389                         <field name="id" reporter:datatype="id" />
7390                         <field name="parent" reporter:datatype="link"/>
7391                         <field name="owner" reporter:datatype="link"/>
7392                         <field name="create_time" reporter:datatype="timestamp"/>
7393                         <field name="name" reporter:datatype="text"/>
7394                         <field name="shared" reporter:datatype="bool"/>
7395                         <field name="share_with" reporter:datatype="link"/>
7396                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7397                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7398                 </fields>
7399                 <links>
7400                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7401                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7402                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7403                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7404                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7405                 </links>
7406         </class>
7407         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7408                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7409                         <field name="id" reporter:datatype="id" />
7410                         <field name="owner" reporter:datatype="link"/>
7411                         <field name="create_time" reporter:datatype="timestamp"/>
7412                         <field name="name" reporter:datatype="text"/>
7413                         <field name="data" reporter:datatype="text"/>
7414                         <field name="folder" reporter:datatype="link"/>
7415                         <field name="description" reporter:datatype="text"/>
7416                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7417                 </fields>
7418                 <links>
7419                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7420                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7421                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7422                 </links>
7423         </class>
7424         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7425                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7426                         <field name="id" reporter:datatype="id" />
7427                         <field name="owner" reporter:datatype="link"/>
7428                         <field name="create_time" reporter:datatype="timestamp"/>
7429                         <field name="template" reporter:datatype="link"/>
7430                         <field name="data" reporter:datatype="text"/>
7431                         <field name="folder" reporter:datatype="link"/>
7432                         <field name="recur" reporter:datatype="bool"/>
7433                         <field name="recurrence" reporter:datatype="interval"/>
7434                         <field name="name" reporter:datatype="text"/>
7435                         <field name="description" reporter:datatype="text"/>
7436                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7437                 </fields>
7438                 <links>
7439                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7440                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7441                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7442                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7443                 </links>
7444         </class>
7445         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7446                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7447                         <field name="id" reporter:datatype="id" />
7448                         <field name="runner" reporter:datatype="link"/>
7449                         <field name="start_time" reporter:datatype="timestamp"/>
7450                         <field name="complete_time" reporter:datatype="timestamp"/>
7451                         <field name="run_time" reporter:datatype="timestamp"/>
7452                         <field name="email" reporter:datatype="text"/>
7453                         <field name="excel_format" reporter:datatype="bool"/>
7454                         <field name="csv_format" reporter:datatype="bool"/>
7455                         <field name="html_format" reporter:datatype="bool"/>
7456                         <field name="error_code" reporter:datatype="int"/>
7457                         <field name="error_text" reporter:datatype="text"/>
7458                         <field name="report" reporter:datatype="link"/>
7459                         <field name="folder" reporter:datatype="link"/>
7460                         <field name="chart_pie" reporter:datatype="bool"/>
7461                         <field name="chart_bar" reporter:datatype="bool"/>
7462                         <field name="chart_line" reporter:datatype="bool"/>
7463                 </fields>
7464                 <links>
7465                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7466                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7467                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7468                 </links>
7469         </class>
7470         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7471                 <fields oils_persist:primary="id">
7472                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7473                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7474                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7475                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7476                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7477                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7478                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7479                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7480                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7481                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7482                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7483                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7484                 </fields>
7485                 <links>
7486                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7487                 </links>
7488         </class>
7489         <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">
7490                 <fields oils_persist:primary="id">
7491                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7492                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7493                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7494                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7495                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7496                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7497                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7498                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7499                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7500                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7501                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7502                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7503                 </fields>
7504                 <links>
7505                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7506                 </links>
7507         </class>
7508         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7509                 <fields oils_persist:primary="id">
7510                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7511                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7512                         <field reporter:label="Fingerprint" name="fingerprint" />
7513                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7514                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7515                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7516                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7517                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7518                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7519                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7520                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7521                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7522                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7523                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7524                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7525                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7526                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7527                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7528                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7529                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7530                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7531                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7532                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7533                 </fields>
7534                 <links>
7535                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7536                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7537                 </links>
7538         </class>
7539         <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">
7540                 <fields oils_persist:primary="id">
7541                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7542                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7543                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7544                 </fields>
7545                 <links>
7546                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7547                 </links>
7548         </class>
7549         <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">
7550                 <fields oils_persist:primary="id">
7551                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7552                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7553                 </fields>
7554                 <links>
7555                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7556                 </links>
7557         </class>
7558         <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">
7559                 <fields oils_persist:primary="id">
7560                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7561                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7562                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7563                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7564                 </fields>
7565                 <links>
7566                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7567                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7568                 </links>
7569         </class>
7570         <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">
7571                 <fields oils_persist:primary="xact">
7572                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7573                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7574                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7575                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7576                 </fields>
7577                 <links>
7578                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7579                 </links>
7580         </class>
7581         <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">
7582                 <fields oils_persist:primary="xact">
7583                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7584                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7585                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7586                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7587                 </fields>
7588                 <links>
7589                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7590                 </links>
7591         </class>
7592         <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)">
7593                 <fields oils_persist:primary="id">
7594                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7595                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7596                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7597                 </fields>
7598                 <links>
7599                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7600                 </links>
7601         </class>
7602         <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">
7603                 <fields oils_persist:primary="id">
7604                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7605                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7606                 </fields>
7607                 <links>
7608                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7609                 </links>
7610         </class>
7611         <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">
7612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7613                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7614                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7615                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7616                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7617                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7618                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7619                 </fields>
7620                 <links>
7621                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7622                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7623                 </links>
7624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7625                         <actions>
7626                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7627                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7628                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7629                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7630                         </actions>
7631                 </permacrud>
7632         </class>
7633         <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">
7634                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7635                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7636                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7637                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7638                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7639                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7640                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7641                 </fields>
7642                 <links>
7643                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7644                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7645                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7646                 </links>
7647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7648                         <actions>
7649                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7650                                         <context link="formula" field="owner"/>
7651                                 </create>
7652                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7653                                         <context link="formula" field="owner"/>
7654                                 </retrieve>
7655                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7656                                         <context link="formula" field="owner"/>
7657                                 </update>
7658                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7659                                         <context link="formula" field="owner"/>
7660                                 </delete>
7661                         </actions>
7662                 </permacrud>
7663         </class>
7664
7665         <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">
7666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7667                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7668                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7669                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7670                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7671                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7672                 </fields>
7673                 <links>
7674                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7675                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7676                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7677                 </links>
7678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7679                         <actions>
7680                                 <create permission="CREATE_PURCHASE_ORDER">
7681                                         <context link="formula" field="owner"/>
7682                 </create>
7683                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7684                                         <context link="formula" field="owner"/>
7685                 </retrieve>
7686                                 <update permission="CREATE_PURCHASE_ORDER">
7687                                         <context link="formula" field="owner"/>
7688                 </update>
7689                                 <delete permission="CREATE_PURCHASE_ORDER">
7690                                         <context link="formula" field="owner"/>
7691                 </delete>
7692                         </actions>
7693                 </permacrud>
7694         </class>
7695
7696         <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">
7697                 <fields oils_persist:primary="id">
7698                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7699                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7700                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7701                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7702                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7703                 </fields>
7704                 <links>
7705                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7706                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7707                 </links>
7708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7709                 </permacrud>
7710         </class>
7711
7712         <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">
7713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7714                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7715                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7716                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7717                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7718                 </fields>
7719                 <links>
7720                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7721                 </links>
7722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7723                         <actions>
7724                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7725                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7726                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7727                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7728                         </actions>
7729                 </permacrud>
7730         </class>
7731
7732         <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">
7733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7734                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7735                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7736                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7737                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7738                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7739                 </fields>
7740                 <links>
7741                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7742                 </links>
7743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7744                         <actions>
7745                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7746                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7747                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7748                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7749                         </actions>
7750                 </permacrud>
7751         </class>
7752
7753         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7754                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7755                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7756                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7757                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7758                 </fields>
7759                 <links>
7760                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7761                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7762                 </links>
7763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7764                 </permacrud>
7765         </class>
7766
7767         <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">
7768                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7769                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7770                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7771                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7772                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7773                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7774                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7775                 </fields>
7776                 <links>
7777                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7778                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7779                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7780                 </links>
7781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7782                 </permacrud>
7783         </class>
7784
7785         <class id="acqscl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7787                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7788                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7789                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7790                 </fields>
7791                 <links>
7792                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7793                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7794                 </links>
7795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7796                 </permacrud>
7797         </class>
7798
7799         <class id="acqscle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7800                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7801                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7802                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7803                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7804                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7805                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7806                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7807                 </fields>
7808                 <links>
7809                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7810                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7811                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7812                 </links>
7813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7814                 </permacrud>
7815         </class>
7816
7817         <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">
7818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7819                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7820                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7821                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7822                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7823                 </fields>
7824                 <links>
7825                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7826                 </links>
7827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7828             <actions>
7829                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7830                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7831                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7832                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7833             </actions>
7834                 </permacrud>
7835         </class>
7836
7837         <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">
7838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7839                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7840                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7841                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7842                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7843                 </fields>
7844                 <links>
7845                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7846                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7847                 </links>
7848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849                         <actions>
7850                                 <create permission="ADMIN_CLAIM_POLICY">
7851                                         <context link="claim_policy" field="org_unit"/>
7852                 </create>
7853                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7854                                         <context link="claim_policy" field="org_unit"/>
7855                 </retrieve>
7856                                 <update permission="ADMIN_CLAIM_POLICY">
7857                                         <context link="claim_policy" field="org_unit"/>
7858                 </update>
7859                                 <delete permission="ADMIN_CLAIM_POLICY">
7860                                         <context link="claim_policy" field="org_unit"/>
7861                 </delete>
7862                         </actions>
7863                 </permacrud>
7864         </class>
7865
7866     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7867         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7868             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7869             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7870             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7871             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7872             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7873             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7874             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7875             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7876             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7877             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7878             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7879             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7880             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7881             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7882             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7883         </fields>
7884     </class>
7885
7886     <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">
7887         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7888             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7889             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7890             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7891             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7892             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7893         </fields>
7894     </class>
7895
7896     <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">
7897         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7898             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7899             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7900             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7901             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7902             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7903             <field reporter:label="City" name="city" reporter:datatype="text"/>
7904             <field reporter:label="State" name="state" reporter:datatype="text"/>
7905             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7906             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7907             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7908         </fields>
7909     </class>
7910
7911     <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">
7912         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7913             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7914             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7915             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7916             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7917             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7918             <field reporter:label="City" name="city" reporter:datatype="text"/>
7919             <field reporter:label="State" name="state" reporter:datatype="text"/>
7920             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7921             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7922             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7923         </fields>
7924     </class>
7925
7926     <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">
7927         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7928             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7929             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7930             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7931             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7932             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7933             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7934         </fields>
7935     </class>
7936
7937         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7938                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7939                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7940                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7941                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7942                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7943                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7944                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7945                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7946                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7947                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7948                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7949                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7950                 </fields>
7951                 <links>
7952                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7953                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7954                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7955                 </links>
7956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7957                 </permacrud>
7958         </class>
7959
7960         <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">
7961                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7962                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7963                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7964                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7965                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7966                 </fields>
7967                 <links>
7968                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7969                 </links>
7970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7971                 </permacrud>
7972         </class>
7973
7974     <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">
7975         <fields>
7976             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7977             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7978             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7979         </fields>
7980                 <links>
7981                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7982                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7983                 </links>
7984     </class>
7985
7986     <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">
7987         <fields>
7988             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7989             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7990         </fields>
7991                 <links>
7992                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7993                 </links>
7994     </class>
7995
7996     <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">
7997         <fields>
7998             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7999             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8000             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8001         </fields>
8002                 <links>
8003                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8004                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8005                 </links>
8006     </class>
8007
8008     <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">
8009         <fields>
8010             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8011             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8012         </fields>
8013                 <links>
8014                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8015                 </links>
8016     </class>
8017
8018     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8019                 <oils_persist:source_definition>
8020
8021             SELECT  DISTINCT l.*
8022               FROM  action.unfulfilled_hold_loops l
8023                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8024               WHERE l.count = m.max
8025
8026                 </oils_persist:source_definition>
8027         <fields>
8028             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8029             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8030             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8031         </fields>
8032                 <links>
8033                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8034                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8035                 </links>
8036     </class>
8037
8038         <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">
8039                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8040                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8041                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8042                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8043                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8044                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8045                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8046                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8047                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8048                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8049                 </fields>
8050                 <links>
8051                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8052                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8053                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8054                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8055                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8056                 </links>
8057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8058                 </permacrud>
8059         </class>
8060
8061         <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">
8062                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8063                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8064                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8065                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8066                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8067                 </fields>
8068                 <links>
8069                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8070                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8071                 </links>
8072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8073                 </permacrud>
8074         </class>
8075
8076         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8077                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8078                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8079                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8080                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8081                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8082                 </fields>
8083                 <links>
8084                 </links>
8085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8086                 </permacrud>
8087         </class>
8088
8089         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8090                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8091                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8092                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8093                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8094                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8095                 </fields>
8096                 <links>
8097                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8098                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8099                 </links>
8100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8101                 </permacrud>
8102         </class>
8103         
8104         <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">
8105                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8106                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8107                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8108                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8109                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8110                 </fields>
8111                 <links>
8112                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8113                 </links>
8114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8115                 </permacrud>
8116         </class>
8117         
8118         <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">
8119                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8120                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8121                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8122                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8123                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8124                 </fields>
8125                 <links>
8126                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8127                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8128                 </links>
8129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8130                 </permacrud>
8131         </class>
8132
8133         <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">
8134                 <fields oils_persist:primary="name">
8135                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8136                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8137                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8138                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8139                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8140                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8141                 </fields>
8142                 <links>
8143                 </links>
8144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8145                 </permacrud>
8146         </class>
8147
8148         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8149                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8150                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8151                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8152                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8153                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8154                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8155                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8156                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8157                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8158                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8159                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8160                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8161                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8162                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8163                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8164                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8165                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8166                 </fields>
8167                 <links>
8168                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8169                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8170                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8171                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8172                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8173                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8174                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8175                 </links>
8176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8177                 </permacrud>
8178         </class>
8179
8180         <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">
8181                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8182                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8183                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8184                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8185                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8186                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8187                 </fields>
8188                 <links>
8189                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8190                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8191                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8192                 </links>
8193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8194                 </permacrud>
8195         </class>
8196
8197         <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">
8198                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8199                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8200                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8201                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8202                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8203                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8204                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8205                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8206                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8207                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8208                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8209                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8210                 </fields>
8211                 <links>
8212                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8213                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8214                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8215                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8216                 </links>
8217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8218                 </permacrud>
8219         </class>
8220
8221         <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">
8222                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8223                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8224                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8225                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8226                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8227                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8228                 </fields>
8229                 <links>
8230                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8231                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8232                 </links>
8233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8234                 </permacrud>
8235         </class>
8236
8237         <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">
8238                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8239                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8240                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8241                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8242                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8243                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8244                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8245                 </fields>
8246                 <links>
8247                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8248                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8249                 </links>
8250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8251                 </permacrud>
8252         </class>
8253
8254         <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">
8255                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8256                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8257                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8258                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8259                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8260                 </fields>
8261                 <links>
8262                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8263                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8264                 </links>
8265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8266                 </permacrud>
8267         </class>
8268
8269         <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">
8270                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8271                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8272                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8273                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8274                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8275                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8276                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8277                 </fields>
8278                 <links>
8279                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8280                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8281                 </links>
8282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8283                 </permacrud>
8284         </class>
8285
8286         <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">
8287                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8288                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8289                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8290                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8291                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8292                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8293                 </fields>
8294                 <links>
8295                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8296                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8297                 </links>
8298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8299                 </permacrud>
8300         </class>
8301
8302         <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">
8303                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8304                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8305                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8306                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8307                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8308                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8309                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8310                 </fields>
8311                 <links>
8312                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8313                 </links>
8314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8315                 </permacrud>
8316         </class>
8317
8318         <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">
8319                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8320                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8321                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8322                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8323                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8324                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8325                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8326                 </fields>
8327                 <links>
8328                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8329                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8330                 </links>
8331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8332                 </permacrud>
8333         </class>
8334
8335         <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">
8336                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8337                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8338                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8339                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8340                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8341                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8342                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8343                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8344                 </fields>
8345                 <links>
8346                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8347                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8348                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8349                 </links>
8350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8351                 </permacrud>
8352         </class>
8353
8354         <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">
8355                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8356                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8357                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8358                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8359                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8360                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8361                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8362                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8363                 </fields>
8364                 <links>
8365                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8366                 </links>
8367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8368                 </permacrud>
8369         </class>
8370
8371         <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">
8372                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8373                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8374                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8375                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8376                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8377                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8378                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8379                 </fields>
8380                 <links>
8381                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8382                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8383                 </links>
8384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8385                 </permacrud>
8386         </class>
8387
8388         <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">
8389                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8390                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8391                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8392                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8393                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8394                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8395                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8396                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8397                 </fields>
8398                 <links>
8399                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8400                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8401                 </links>
8402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8403                 </permacrud>
8404         </class>
8405
8406         <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">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8408                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8409                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8410                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8411                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8412                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8413                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8414                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8415                 </fields>
8416                 <links>
8417                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8418                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8419                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8420                 </links>
8421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8422                 </permacrud>
8423         </class>
8424
8425         <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">
8426                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8427                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8428                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8429                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8430                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8431                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8432                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8433                 </fields>
8434                 <links>
8435                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8436                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8437                 </links>
8438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8439                 </permacrud>
8440         </class>
8441
8442         <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">
8443                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8444                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8445                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8446                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8447                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8448                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8449                 </fields>
8450                 <links>
8451                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8452                 </links>
8453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8454                 </permacrud>
8455         </class>
8456
8457         <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">
8458                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8459                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8460                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8461                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8462                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8463                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8464                 </fields>
8465                 <links>
8466                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8467                 </links>
8468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8469                 </permacrud>
8470         </class>
8471
8472         <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">
8473                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8474                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8475                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8476                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8477                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8478                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8479                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8480                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8481                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8482                 </fields>
8483                 <links>
8484                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8485                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8486                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8487                 </links>
8488                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8489                 </permacrud>
8490         </class>
8491
8492         <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">
8493                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8494                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8495                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8496                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8497                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8498                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8499                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8500                 </fields>
8501                 <links>
8502                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8503                 </links>
8504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8505                 </permacrud>
8506         </class>
8507
8508         <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">
8509                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8510                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8511                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8512                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8513                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8514                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8515                 </fields>
8516                 <links>
8517                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8518                 </links>
8519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8520                 </permacrud>
8521         </class>
8522
8523         <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">
8524                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8525                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8526                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8527                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8528                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8529                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8530                 </fields>
8531                 <links>
8532                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8533                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8534                 </links>
8535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8536                 </permacrud>
8537         </class>
8538
8539         <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">
8540                 <fields oils_persist:primary="id">
8541                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8542                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8543                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8544                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8545                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8546                 </fields>
8547                 <links>
8548                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8549                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8550                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8551                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8552                 </links>
8553         </class>
8554
8555         <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">
8556                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8557                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8558                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8559                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8560                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8561                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8562                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8563                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8564                 </fields>
8565                 <links/>
8566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8567                         <actions>
8568                                 <retrieve/>
8569                         </actions>
8570                 </permacrud>
8571         </class>
8572
8573         <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">
8574                 <fields oils_persist:primary="ptype_key">
8575                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8576                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8577                 </fields>
8578                 <links/>
8579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8580                         <actions>
8581                                 <retrieve/>
8582                         </actions>
8583                 </permacrud>
8584         </class>
8585
8586         <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">
8587                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8588                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8589                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8590                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8591                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8592                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8593                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8594                 </fields>
8595                 <links>
8596                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8597                 </links>
8598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8599                         <actions>
8600                                 <retrieve/>
8601                         </actions>
8602                 </permacrud>
8603         </class>
8604
8605         <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">
8606                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8607                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8608                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8609                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8610                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8611                 </fields>
8612                 <links>
8613                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8614                 </links>
8615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8616                         <actions>
8617                                 <retrieve/>
8618                         </actions>
8619                 </permacrud>
8620         </class>
8621
8622         <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">
8623                 <fields oils_persist:primary="code">
8624                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8625                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8626                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8627                 </fields>
8628                 <links/>
8629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8630                         <actions>
8631                                 <retrieve/>
8632                         </actions>
8633                 </permacrud>
8634         </class>
8635
8636         <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">
8637                 <oils_persist:source_definition>
8638
8639             SELECT  b.id,
8640                     MAX(dcp.edit_date) AS last_delete_date
8641              FROM   biblio.record_entry b
8642                     JOIN asset.call_number cn ON (cn.record = b.id)
8643                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8644              WHERE  NOT b.deleted
8645              GROUP BY b.id
8646              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8647
8648                 </oils_persist:source_definition>
8649                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8650                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8651                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8652                 </fields>
8653                 <links>
8654                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8655                 </links>
8656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8657                         <actions>
8658                                 <retrieve/>
8659                         </actions>
8660                 </permacrud>
8661         </class>
8662
8663         <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">
8664                 <oils_persist:source_definition>
8665
8666             -- -- 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.
8667             -- -- 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
8668             -- -- may not.
8669             -- SELECT
8670             --     bre.id AS "bib_id",
8671             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8672             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8673             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8674             -- FROM (
8675                 SELECT
8676                     y.bre AS "id",
8677                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8678                     y.hold_count AS "hold_count",
8679                     (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"
8680                 FROM (
8681                         SELECT
8682                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8683                             COUNT(*) AS "hold_count"
8684                         FROM action.hold_request h
8685                         WHERE
8686                             cancel_time IS NULL
8687                             AND fulfillment_time IS NULL
8688                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8689                         GROUP BY 1
8690                     )y LEFT JOIN (
8691                         SELECT 
8692                             (SELECT id
8693                                 FROM biblio.record_entry 
8694                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8695                             ) AS "bre", 
8696                             COUNT(*) AS "copy_count"
8697                         FROM asset.copy
8698                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8699                         WHERE copy.holdable 
8700                             AND NOT copy.deleted 
8701                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8702                         GROUP BY 1
8703                     )x ON x.bre = y.bre
8704                 -- )z RIGHT JOIN (
8705                 --     SELECT id
8706                 --     FROM biblio.record_entry
8707                 --     WHERE NOT deleted
8708                 -- )bre ON (z.bib_id = bre.id)
8709                 
8710
8711                 </oils_persist:source_definition>
8712                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8713                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8714                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8715                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8716                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8717                 </fields>
8718                 <links>
8719                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8720                 </links>
8721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8722                         <actions>
8723                                 <retrieve/>
8724                         </actions>
8725                 </permacrud>
8726         </class>
8727
8728         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
8729                 <oils_persist:source_definition>
8730             SELECT *,
8731                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
8732                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
8733             FROM
8734                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
8735                     FROM
8736                         action.hold_request ahr
8737                         JOIN reporter.hold_request_record rhrr USING (id)
8738                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8739                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
8740                     WHERE
8741                         ahr.cancel_time IS NULL
8742                         AND ahr.fulfillment_time IS NULL
8743                     GROUP BY bib_record, pickup_lib
8744                 )x
8745                 JOIN
8746                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
8747                     FROM
8748                         action.hold_request ahr
8749                         JOIN reporter.hold_request_record rhrr USING (id)
8750                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8751                     WHERE
8752                         ahr.cancel_time IS NULL
8753                         AND ahr.fulfillment_time IS NULL
8754                     GROUP BY bib_record
8755                 )y
8756                 USING (id)
8757                 </oils_persist:source_definition>
8758                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8759                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
8760                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
8761                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
8762                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
8763                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
8764                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
8765                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
8766                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
8767                 </fields>
8768                 <links>
8769                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8770                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8771                 </links>
8772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8773                         <actions>
8774                                 <retrieve/>
8775                         </actions>
8776                 </permacrud>
8777         </class>
8778
8779         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
8780                 <oils_persist:source_definition>
8781             SELECT
8782                 ac.id,
8783                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
8784                 MAX(actac.xact_start) AS last_circ
8785             FROM asset.copy ac
8786                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8787             GROUP BY ac.id
8788
8789             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
8790             --SELECT
8791             --    ac.id,
8792             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
8793             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
8794             --FROM asset.copy ac
8795             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8796             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
8797             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
8798                 </oils_persist:source_definition>
8799                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8800                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
8801                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
8802                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
8803                 </fields>
8804                 <links>
8805                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8806                 </links>
8807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8808                         <actions>
8809                                 <retrieve/>
8810                         </actions>
8811                 </permacrud>
8812         </class>
8813
8814         <!-- ********************************************************************************************************************* -->
8815         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8816         <!-- ********************************************************************************************************************* -->
8817         <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">
8818                 <fields oils_persist:primary="id">
8819                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8820                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8821                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8822                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8823                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8824                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8825                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8826                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8827                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8828                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8829                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8830                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8831                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8832                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8833                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8834                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8835                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8836                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8837                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8838                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8839                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8840                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8841                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8842                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8843                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8844                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8845                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8846                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8847                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8848                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8849                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8850                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8851                 </fields>
8852                 <links>
8853                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8854                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8855                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8856                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8857                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8858                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8859                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8860                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8861                 </links>
8862         </class>
8863
8864         <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">
8865                 <fields oils_persist:primary="id">
8866                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8867                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8868                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8869                 </fields>
8870                 <links>
8871                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8872                 </links>
8873         </class>
8874
8875         <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">
8876                 <fields oils_persist:primary="id">
8877                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8878                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8879                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8880                 </fields>
8881                 <links>
8882                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8883                 </links>
8884         </class>
8885
8886         <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">
8887                 <fields oils_persist:primary="id">
8888                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8889
8890                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8891                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8892                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8893
8894                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8895                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8896                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8897
8898                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8899                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8900
8901                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8902                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8903                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8904
8905                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8906                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8907
8908                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8909                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8910                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8911
8912                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8913                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8914                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8915
8916                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8917                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8918                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8919                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8920
8921                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8922                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8923
8924                 </fields>
8925                 <links>
8926                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8927                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8928                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8929                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8930                 </links>
8931         </class>
8932
8933         <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">
8934                 <oils_persist:source_definition>
8935
8936             SELECT
8937                 po.ordering_agency AS ordering_agency,
8938                 po.id AS purchase_order,
8939                 li.id AS lineitem,
8940                 lid.id AS lineitem_detail,
8941                 cpa.id AS claim_policy_action
8942             FROM
8943                 acq.lineitem_detail lid
8944                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8945                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8946                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8947                 JOIN acq.claim_policy_action cpa ON (
8948                     cpa.claim_policy = cp.id
8949
8950                     -- we only care about claim policy actions whose claim
8951                     -- interval we'd reached or exceeded
8952                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8953
8954                     -- filter out all claim policy actions where claim events
8955                     -- have occurred on or after the action's action_interval
8956                     AND NOT EXISTS (
8957                         SELECT 1
8958                         FROM
8959                             acq.claim_event evt
8960                             JOIN acq.claim claim ON (
8961                                 claim.id = evt.claim
8962                                 AND claim.lineitem_detail = lid.id
8963                             )
8964                         WHERE
8965                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8966                     )
8967                 )
8968             WHERE
8969                 lid.cancel_reason IS NULL
8970                 AND li.cancel_reason IS NULL -- belt/suspenders
8971                 AND po.cancel_reason IS NULL -- belt/suspenders
8972                 AND lid.recv_time IS NULL
8973                 AND po.state = 'on-order'
8974             ORDER BY 1, 2, 3, 4, 5
8975
8976                 </oils_persist:source_definition>
8977                 <fields>
8978                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8979                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8980                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8981                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8982                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8983                 </fields>
8984                 <links>
8985                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8986                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8987                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8988                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8989                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8990                 </links>
8991         </class>
8992
8993         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8994                 <oils_persist:source_definition>
8995
8996             SELECT 
8997                 li.id AS lineitem, 
8998                 (
8999                     SELECT COUNT(lid.id) 
9000                     FROM acq.lineitem_detail lid
9001                     WHERE lineitem = li.id
9002                 ) AS item_count,
9003                 (
9004                     SELECT COUNT(lid.id) 
9005                     FROM acq.lineitem_detail lid
9006                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9007                 ) AS recv_count,
9008                 (
9009                     SELECT COUNT(lid.id) 
9010                     FROM acq.lineitem_detail lid
9011                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9012                 ) AS cancel_count,
9013                 (
9014                     SELECT COUNT(lid.id) 
9015                     FROM acq.lineitem_detail lid
9016                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9017                     WHERE NOT debit.encumbrance AND lineitem = li.id
9018                 ) AS invoice_count,
9019                 (
9020                     SELECT COUNT(DISTINCT(lid.id)) 
9021                     FROM acq.lineitem_detail lid
9022                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9023                     WHERE lineitem = li.id
9024                 ) AS claim_count,
9025                 (
9026                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9027                     FROM acq.lineitem_detail lid
9028                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9029                 ) AS estimated_amount,
9030                 (
9031                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9032                     FROM acq.lineitem_detail lid
9033                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9034                     WHERE debit.encumbrance AND lineitem = li.id
9035                 ) AS encumbrance_amount,
9036                 (
9037                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9038                     FROM acq.lineitem_detail lid
9039                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9040                     WHERE NOT debit.encumbrance AND lineitem = li.id
9041                 ) AS paid_amount
9042
9043                 FROM acq.lineitem AS li
9044         </oils_persist:source_definition>
9045                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9046                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9047                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9048                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9049                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9050                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9051                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9052                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9053                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9054                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9055                 </fields>
9056                 <links>
9057                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9058                 </links>
9059     </class>
9060
9061
9062         <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">
9063                 <oils_persist:source_definition>
9064
9065                         SELECT  t.*
9066                           FROM  action.transit_copy t
9067                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9068                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9069                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9070
9071                 </oils_persist:source_definition>
9072                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9073                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9074                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9075                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9076                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9077                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9078                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9079                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9080                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9081                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9082                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9083                 </fields>
9084                 <links>
9085                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9086                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9087                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9088                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9089                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9090                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9091                 </links>
9092         </class>
9093
9094     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9095                 <oils_persist:source_definition>
9096
9097         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9098                 SELECT
9099                         cp.id as copy,
9100                         COUNT(circ.id),
9101                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9102                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9103                 FROM
9104                         asset.copy cp
9105                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9106                 GROUP BY 1, 3, 4
9107                 UNION
9108                 SELECT
9109                         cp.id as copy,
9110                         COUNT(circ.id),
9111                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9112                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9113                 FROM
9114                         asset.copy cp
9115                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9116                 GROUP BY 1, 3, 4
9117                 UNION
9118                 SELECT
9119                         id as copy,
9120                         circ_count,
9121                         -1 AS year,
9122                         false as is_renewal
9123                 FROM
9124                         extend_reporter.legacy_circ_count
9125         )x GROUP BY 1, 3, 4
9126
9127                 </oils_persist:source_definition>
9128         <fields>
9129             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9130             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9131             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9132             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9133         </fields>
9134                 <links>
9135                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9136                 </links>
9137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9138                         <actions>
9139                                 <retrieve/>
9140                         </actions>
9141                 </permacrud>
9142     </class>
9143
9144         <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">
9145                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9146                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9147                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9148                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9149                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9150                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9151                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9152                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9153                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9154                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9155                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9156                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9157                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9158                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9159                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9160                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9161                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9162                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9163                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9164                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9165                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9166                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9167                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9168                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9169                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9170                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9171                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9172                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9173                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9174                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9175                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9176                 </fields>
9177                 <links>
9178                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9179                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9180                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9181                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9182                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9183                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9184                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9185                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9186                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9187                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9188                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9189                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9190                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9191                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9192                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9193                 </links>
9194         </class>
9195
9196     <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">
9197         <fields oils_persist:primary="id">
9198             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9199             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9200             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9201             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9202             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9203             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9204             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9205             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9206             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9207             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9208             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9209             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9210             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9211             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9212             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9213             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9214             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9215             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9216             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9217             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9218             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9219             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9220             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9221             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9222             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9223             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9224             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9225             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9226             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9227             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9228             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9229             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9230             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9231             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9232         </fields>
9233         <links>
9234             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9235             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9236             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9237             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9238             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9239         </links>
9240     </class>
9241
9242     <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">
9243         <fields oils_persist:primary="id">
9244             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9245             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9246             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9247             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9248         </fields>
9249         <links>
9250             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9251             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9252         </links>
9253     </class>
9254
9255     <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">
9256         <fields oils_persist:primary="owning_lib">
9257             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9258             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9259             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9260         </fields>
9261         <links>
9262             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9263         </links>
9264     </class>
9265
9266     <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">
9267         <fields oils_persist:primary="id">
9268             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9269             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9270             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9271             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9272             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9273         </fields>
9274         <links>
9275             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9276             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9277             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9278         </links>
9279     </class>
9280
9281     <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">
9282         <fields oils_persist:primary="circ_lib">
9283             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9284             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9285             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9286             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9287         </fields>
9288         <links>
9289             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9290             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9291         </links>
9292     </class>
9293
9294     <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">
9295         <fields oils_persist:primary="id">
9296             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9297             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9298             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9299             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9300             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9301         </fields>
9302         <links>
9303             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9304             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9305             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9306         </links>
9307     </class>
9308
9309     <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">
9310         <fields oils_persist:primary="home_ou">
9311             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9312             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9313             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9314             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9315         </fields>
9316         <links>
9317             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9318             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9319         </links>
9320     </class>
9321         <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">
9322                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9323                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9324                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9325                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9326                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9327                 </fields>
9328                 <links>
9329                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9330                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9331                 </links>
9332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9333                         <actions>
9334                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9335                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9336                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9337                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9338                         </actions>
9339                 </permacrud>
9340         </class>
9341         <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">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9343                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9344                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9345                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9346                 </fields>
9347                 <links>
9348                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9349                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9350                         </links>
9351                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9352                 <actions>
9353                                 <create permission="ADMIN_ACQ_FUND_TAG">
9354                                         <context link="tag" field="owner"/>
9355                                 </create>
9356                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9357                                         <context link="tag" field="owner"/>
9358                                 </retrieve>
9359                                 <update permission="ADMIN_ACQ_FUND_TAG">
9360                                         <context link="tag" field="owner"/>
9361                                 </update>
9362                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9363                                         <context link="tag" field="owner"/>
9364                                 </delete>
9365                         </actions>
9366                 </permacrud>
9367         </class>
9368         <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
9369                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9370                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9371                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9372                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9373                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9374                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9375                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9376                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9377                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9378                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9379                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9380                 </fields>
9381                 <links>
9382                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9383                 </links>
9384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9385                         <actions>
9386                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9387                                 <retrieve/>
9388                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9389                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9390                         </actions>
9391                 </permacrud>
9392         </class>
9393
9394         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
9395                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9396                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9397                         <field name="date_applied" reporter:datatype="timestamp"/>
9398                         <field name="org" reporter:datatype="org_unit"/>
9399                         <field name="original_value" reporter:datatype="text"/>
9400                         <field name="new_value" reporter:datatype="text"/>
9401                         <field name="field_name" reporter:datatype="link"/>
9402                 </fields>
9403                 <links>
9404                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9405                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9406                 </links>
9407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9408                         <actions>
9409                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9410                                 <retrieve/>
9411                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9412                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9413                         </actions>
9414                 </permacrud>
9415         </class>
9416         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
9417                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9418                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9419                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9420                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9421                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9422                 </fields>
9423                 <links>
9424                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9425                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9426                 </links>
9427         </class>
9428         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
9429                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9430                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9431                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9432                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9433                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9434                 </fields>
9435                 <links>
9436                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9437                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9438                 </links>
9439         </class>
9440
9441
9442         <!-- ********************************************************************************************************************* -->
9443
9444 </IDL>
9445
9446 <!--
9447     vim:noet:ts=4:sw=4:
9448 -->