]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Merge remote-tracking branch 'eg-working/collab/phasefx/merged_bill_and_receipt_fixes'
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <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="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">
729                 <fields oils_persist:primary="id">
730                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
731                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
732                 </fields>
733                 <links>
734                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
735                 </links>
736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
737             <actions>
738                 <retrieve/>
739             </actions>
740         </permacrud>
741         </class>
742
743         <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">
744                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
746                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
747                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
748                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
749                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
750                 </fields>
751                 <links>
752                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
753                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758                 <retrieve/>
759                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
760                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761             </actions>
762         </permacrud>
763         </class>
764
765         <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">
766                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
767                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
768                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
769                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
770                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
771                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
772                 </fields>
773                 <links>
774                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
775                 </links>
776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
777             <actions>
778                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
779                 <retrieve/>
780                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
781                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
782             </actions>
783         </permacrud>
784         </class>
785
786         <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">
787                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
788                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
789                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
790                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
791                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
792                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
793                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
794                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
795                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
796                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
797                 </fields>
798                 <links>
799                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
800                 </links>
801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
802             <actions>
803                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
804                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
805                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
806                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
807             </actions>
808         </permacrud>
809         </class>
810
811     <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">
812         <fields oils_persist:primary="name">
813             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
814             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
815             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
816             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
817             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
818             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
819             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
820             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
821             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
822             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
823         </fields>
824         <links>
825             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
826             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
827         </links>
828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
829             <actions>
830                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
831                 <retrieve/>
832                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
833                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
834             </actions>
835         </permacrud>
836     </class>
837
838     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
839         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
840             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
841             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
842             <field reporter:label="Name" name="name" reporter:datatype="text"/>
843             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
844             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
845             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
846             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
847         </fields>
848         <links>
849             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
850         </links>
851     </class>
852
853         <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">
854                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
855                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
856                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
857                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
858                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
859                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
860                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
861                 </fields>
862                 <links>
863             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
864             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
865                 </links>
866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
867                         <actions>
868                                 <retrieve/>
869                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
870                         </actions>
871                 </permacrud>
872         </class>
873
874         <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">
875                 <fields oils_persist:primary="key">
876                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
877                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
878                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
879                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
880                 </fields>
881                 <links/>
882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
883                         <actions>
884                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
885                                 <retrieve/>
886                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
887                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
888                         </actions>
889                 </permacrud>
890         </class>
891
892         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
893                 <fields oils_persist:primary="module">
894                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
895                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
896                 </fields>
897                 <links/>
898         </class>
899
900         <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">
901                 <fields oils_persist:primary="module">
902                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
903                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
904                 </fields>
905                 <links/>
906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
907                         <actions>
908                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
909                                 <retrieve/>
910                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
911                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
912                         </actions>
913                 </permacrud>
914         </class>
915
916         <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">
917                 <fields oils_persist:primary="module">
918                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
919                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
920                 </fields>
921                 <links/>
922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
923                         <actions>
924                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
925                                 <retrieve/>
926                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
927                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
928                         </actions>
929                 </permacrud>
930         </class>
931
932         <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">
933                 <fields oils_persist:primary="module">
934                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
935                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
936                 </fields>
937                 <links/>
938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
939                         <actions>
940                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
941                                 <retrieve/>
942                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
943                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
944                         </actions>
945                 </permacrud>
946         </class>
947
948         <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">
949                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
950                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
951                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
952                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
953                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
954                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
955                 </fields>
956                 <links>
957                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
958                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
959                 </links>
960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
961                         <actions>
962                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
963                     <context link="event_def" field="owner"/>
964                 </create>
965                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
966                     <context link="event_def" field="owner"/>
967                 </retrieve>
968                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
969                     <context link="event_def" field="owner"/>
970                 </update>
971                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
972                     <context link="event_def" field="owner"/>
973                 </delete>
974                         </actions>
975                 </permacrud>
976         </class>
977
978         <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">
979                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
980                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
981                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
982                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
983                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
984                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
985                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
986                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
987                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
988                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
989                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
990                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
991                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
992                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
993                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
994                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
995                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
996                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
997                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
998                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
999                 </fields>
1000                 <links>
1001                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1002                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1003                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1004                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1005                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1006                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1007                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1008                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1009                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1010                 </links>
1011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1012                         <actions>
1013                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1014                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1015                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1016                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1017                         </actions>
1018                 </permacrud>
1019         </class>
1020
1021         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1022                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1023                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1024                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1025                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1026                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1027                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1028                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1029                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1030                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1031                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1032                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1033                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1034                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1035                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1036                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1037                 </fields>
1038                 <links>
1039                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1040                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1041                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1042                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1043                 </links>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1048                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1049                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1050                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1051                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1052                 </fields>
1053                 <links>
1054                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1055                 </links>
1056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1057                         <actions>
1058                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1059                     <context link="event_def" field="owner"/>
1060                 </create>
1061                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1062                     <context link="event_def" field="owner"/>
1063                 </retrieve>
1064                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1065                     <context link="event_def" field="owner"/>
1066                 </update>
1067                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1068                     <context link="event_def" field="owner"/>
1069                 </delete>
1070                         </actions>
1071                 </permacrud>
1072         </class>
1073
1074         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1075                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1076                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1077                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1078                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1079                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1080                 </fields>
1081                 <links>
1082                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1083                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1084                 </links>
1085         </class>
1086
1087         <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">
1088                 <fields oils_persist:primary="code">
1089                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1090                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1091                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1092                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1093                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1094                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1095                 </fields>
1096                 <links/>
1097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1098             <actions>
1099                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1100                 <retrieve/>
1101                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1102                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1103             </actions>
1104         </permacrud>
1105         </class>
1106
1107         <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">
1108                 <fields oils_persist:primary="code">
1109                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1110                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1111                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1112                 </fields>
1113                 <links/>
1114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1115             <actions>
1116                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1117                 <retrieve/>
1118                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1119                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1120             </actions>
1121         </permacrud>
1122         </class>
1123
1124         <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">
1125                 <fields oils_persist:primary="code">
1126                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1127                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1128                 </fields>
1129                 <links/>
1130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1131             <actions>
1132                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1133                 <retrieve/>
1134                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1135                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1136             </actions>
1137         </permacrud>
1138         </class>
1139
1140         <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">
1141                 <fields oils_persist:primary="code">
1142                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1143                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1144                 </fields>
1145                 <links/>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1151                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <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">
1157                 <fields oils_persist:primary="code">
1158                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1159                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1160                 </fields>
1161                 <links/>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1167                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <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">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1175                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1176                 </fields>
1177                 <links/>
1178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1179             <actions>
1180                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1181                 <retrieve/>
1182                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1183                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1184             </actions>
1185         </permacrud>
1186         </class>
1187
1188         <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">
1189                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1190                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1191                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1192                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1193                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1194                 </fields>
1195         <links>
1196             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1197             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1198             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1199         </links>
1200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1201             <actions>
1202                 <create permission="UPDATE_COPY">
1203                     <context link="target_copy" field="circ_lib"/>
1204                 </create>
1205                 <retrieve/>
1206                 <update permission="UPDATE_COPY">
1207                     <context link="target_copy" field="circ_lib"/>
1208                 </update>
1209                 <delete permission="UPDATE_COPY">
1210                     <context link="target_copy" field="circ_lib"/>
1211                 </delete>
1212             </actions>
1213         </permacrud>
1214         </class>
1215
1216         <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">
1217                 <fields oils_persist:primary="code">
1218                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1219                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1220                 </fields>
1221                 <links/>
1222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1223             <actions>
1224                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1225                 <retrieve/>
1226                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1227                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1228             </actions>
1229         </permacrud>
1230         </class>
1231
1232         <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">
1233                 <fields oils_persist:primary="code">
1234                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1235                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1236                 </fields>
1237                 <links/>
1238         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1239             <actions>
1240                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1241                 <retrieve/>
1242                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1243                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1244             </actions>
1245         </permacrud>
1246         </class>
1247
1248         <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">
1249                 <fields oils_persist:primary="code">
1250                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1251                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1252                 </fields>
1253                 <links/>
1254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1255             <actions>
1256                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1257                 <retrieve/>
1258                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1259                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1260             </actions>
1261         </permacrud>
1262         </class>
1263
1264     <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">
1265         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1266             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1267             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1268             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1269             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1270             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1271             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1272             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1273             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1274             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1275             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1276             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1277             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1278             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1279             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1280             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1281         </fields>
1282         <links/>
1283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1284             <actions>
1285                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1286                 <retrieve/>
1287                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1288                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1289             </actions>
1290         </permacrud>
1291     </class>
1292
1293     <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">
1294         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1295             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1296             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1297             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1298             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1299             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1300             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1301             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1302             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1303             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1304             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1305             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1306             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1307             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1308             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1309             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1310         </fields>
1311         <links/>
1312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1313             <actions>
1314                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1315                 <retrieve/>
1316                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1317                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1318             </actions>
1319         </permacrud>
1320     </class>
1321
1322     <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">
1323         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1324             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1325             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1326             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1327             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1328             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1329         </fields>
1330         <links>
1331             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1332             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1333             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1334         </links>
1335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1336             <actions>
1337                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1338                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1339                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1340                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1341             </actions>
1342         </permacrud>
1343     </class>
1344
1345         <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">
1346                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1347                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1348                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1349                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1350                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1351                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1352                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1353                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1354                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1355                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1356                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1357                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1358                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1359                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1360                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1361                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1362                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1363             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1364                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1365                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1366                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1367                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1368                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1369                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1370                 </fields>
1371                 <links>
1372                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1373                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1374                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1375                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1376                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1377                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1378                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1379                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1380                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1381                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1382                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1383                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1384                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1385             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1386                 </links>
1387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388             <actions>
1389                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1390                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1391                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1392                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1393             </actions>
1394         </permacrud>
1395         </class>
1396
1397         <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">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1399                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1401                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1402                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1403                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1404                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1405                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1406                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1407                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1408                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1409                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1410                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1411                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1412                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1413             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1414                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1415                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1416             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1417                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1418                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1419                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1420                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1421             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1422             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1423             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1424                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1425                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1426                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1427                 </fields>
1428                 <links>
1429                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1430                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1431                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1432                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1433                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1434                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1435                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1436                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1437                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1438                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1439                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1440                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1441                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1442             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1443                 </links>
1444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1445             <actions>
1446                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1447                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1448                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1449                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1450             </actions>
1451         </permacrud>
1452         </class>
1453
1454         <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">
1455                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1456                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1457                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1458                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1459                 </fields>
1460                 <links>
1461                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1462                 </links>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1466                     <context link="matchpoint" field="org_unit"/>
1467                 </create>
1468                 <retrieve/>
1469                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1470                     <context link="matchpoint" field="org_unit"/>
1471                 </update>
1472                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1473                     <context link="matchpoint" field="org_unit"/>
1474                 </delete>
1475             </actions>
1476         </permacrud>
1477         </class>
1478
1479         <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">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1481                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1483                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1484                 </fields>
1485                 <links>
1486                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1487                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1488                 </links>
1489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1490             <actions>
1491                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1492                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1493                 </create>
1494                 <retrieve/>
1495                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1496                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1497                 </update>
1498                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1499                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1500                 </delete>
1501             </actions>
1502         </permacrud>
1503         </class>
1504
1505         <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">
1506                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1507                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1508                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1509                 </fields>
1510                 <links/>
1511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512             <actions>
1513                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1514                 <retrieve/>
1515                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1516                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1517             </actions>
1518         </permacrud>
1519         </class>
1520
1521         <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">
1522                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1523                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1524                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1525                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1526                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1527                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1528                 </fields>
1529                 <links>
1530                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1531                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1532                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1533                 </links>
1534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1535             <actions>
1536                 <create permission="ADMIN_SURVEY">
1537                     <context link="survey" field="owner"/>
1538                 </create>
1539                 <retrieve/>
1540                 <update permission="ADMIN_SURVEY">
1541                     <context link="survey" field="owner"/>
1542                 </update>
1543                 <delete permission="ADMIN_SURVEY">
1544                     <context link="survey" field="owner"/>
1545                 </delete>
1546             </actions>
1547         </permacrud>
1548         </class>
1549         <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">
1550                 <fields oils_persist:primary="id" oils_persist:sequence="">
1551                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1552                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1553                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1554                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1555                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1556                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1557                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1558                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1559                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1560                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1561                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1562                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1563                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1564                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1565                 </fields>
1566                 <links>
1567                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1568                 </links>
1569         </class>
1570         <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">
1571                 <fields oils_persist:primary="id" oils_persist:sequence="">
1572                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1573                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1574                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1575                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1576                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1577                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1578                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1579                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1580                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1581                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1582                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1583                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1584                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1585                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1586                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1587                 </fields>
1588                 <links>
1589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1590                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1591                 </links>
1592         </class>
1593         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1595                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1596                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1597                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1598                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1599                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1600                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1601                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1602                 </fields>
1603                 <links>
1604                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1605                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1606                 </links>
1607         </class>
1608         <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">
1609                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1610                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1611                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1612                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1613                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1614                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1615                 </fields>
1616                 <links>
1617                         <link field="usr" reltype="has_a" key="id" class="au"/>
1618                 </links>
1619         </class>
1620         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1621                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1622                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1623                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1624                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1625                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1626                 </fields>
1627                 <links>
1628                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1629                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1630                 </links>
1631         </class>
1632         <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">
1633                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1634                         <field name="field" reporter:datatype="link"/>
1635                         <field name="id" reporter:datatype="id" />
1636                         <field name="source" reporter:datatype="link"/>
1637                         <field name="value" reporter:datatype="text"/>
1638                 </fields>
1639                 <links>
1640                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1641                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1642                 </links>
1643         </class>
1644         <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">
1645                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1646                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1647                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1648                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1649                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1650                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1651                 </fields>
1652                 <links>
1653                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1654                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1655                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1656                 </links>
1657         </class>
1658         <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">
1659                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1660                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1661                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1662                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1663                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1664                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1665                 </fields>
1666                 <links>
1667                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1668                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1669                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1670                 </links>
1671         </class>
1672         <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">
1673                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1674                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1675                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1676                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1677                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1678                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1679                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1680                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1681                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1682                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1683                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1684                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1685                 </fields>
1686                 <links>
1687                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1688                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1689                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1690                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1691                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1692                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1693                 </links>
1694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1695             <actions>
1696                 <create permission="TRANSIT_COPY" context_field="owner">
1697                     <context link="target_copy" field="circ_lib"/>
1698                 </create>
1699                 <retrieve/>
1700                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1701                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1702             </actions>
1703         </permacrud>
1704         </class>
1705         <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">
1706                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1707                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1708                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1709                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1710                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1711                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1712                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1713                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1714                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1715                 </fields>
1716                 <links>
1717                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1718                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1719                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1720                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1721                 </links>
1722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1723             <actions>
1724                 <create permission="ADMIN_SURVEY">
1725                     <context link="survey" field="owner"/>
1726                 </create>
1727                 <retrieve/>
1728                 <update permission="ADMIN_SURVEY">
1729                     <context link="survey" field="owner"/>
1730                 </update>
1731                 <delete permission="ADMIN_SURVEY">
1732                     <context link="survey" field="owner"/>
1733                 </delete>
1734             </actions>
1735         </permacrud>
1736         </class>
1737         <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">
1738                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1739                         <field name="bucket" />
1740                         <field name="id" reporter:datatype="id" />
1741                         <field name="target_copy" reporter:datatype="link"/>
1742                         <field name="create_time" reporter:datatype="timestamp" />
1743                         <field name="pos" reporter:datatype="int" />
1744                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1745                 </fields>
1746                 <links>
1747                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1748                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1749             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1750                 </links>
1751         </class>
1752         <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">
1753                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1754                         <field name="id" reporter:datatype="id" />
1755                         <field name="item" reporter:datatype="link"/>
1756                         <field name="note" reporter:datatype="text" />
1757                 </fields>
1758                 <links>
1759                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1760                 </links>
1761         </class>
1762
1763         <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">
1764                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1765                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1766                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1767                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1768                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1769                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1770                 </fields>
1771                 <links>
1772                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1773                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1774                 </links>
1775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1776                         <actions>
1777                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1778                                 <retrieve/>
1779                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1780                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1781                         </actions>
1782                 </permacrud>
1783         </class>
1784
1785         <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">
1786                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1787                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1788                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1789                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1790                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1791                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1792                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1793                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1794                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1795                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1796                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1797                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1798                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1799                 </fields>
1800                 <links>
1801                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1802                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1803                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1804                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1805                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1806                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1807                 </links>
1808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1809                         <actions>
1810                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1811                                 <retrieve/>
1812                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1813                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1814                         </actions>
1815                 </permacrud>
1816         </class>
1817
1818         <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">
1819                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1820                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1821                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1822                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1823                 </fields>
1824                 <links>
1825                         <link field="authority_field" reltype="has_a" key="id" 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="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">
1838                 <fields oils_persist:primary="code">
1839                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1840                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1841                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1842                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1843                 </fields>
1844                 <links>
1845                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1846                 </links>
1847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1848                         <actions>
1849                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1850                                 <retrieve/>
1851                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1852                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1853                         </actions>
1854                 </permacrud>
1855         </class>
1856
1857         <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">
1858                 <fields oils_persist:primary="code">
1859                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1860                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1861                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1862                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1863                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1864                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1865                 </fields>
1866                 <links>
1867                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1868                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1869                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1870                 </links>
1871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1872                         <actions>
1873                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1874                                 <retrieve/>
1875                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1876                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1877                         </actions>
1878                 </permacrud>
1879         </class>
1880
1881     <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">
1882         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1883             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1884             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1885             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1886         </fields>
1887         <links>
1888             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1889             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1890         </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1894                 <retrieve/>
1895                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1896                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899     </class>
1900
1901         <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">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1903                         <field name="active" reporter:datatype="bool"/>
1904                         <field name="create_date" reporter:datatype="timestamp"/>
1905                         <field name="creator" />
1906                         <field name="deleted" reporter:datatype="bool"/>
1907                         <field name="edit_date" reporter:datatype="timestamp"/>
1908                         <field name="editor" />
1909                         <field name="id" reporter:datatype="id" />
1910                         <field name="last_xact_id" />
1911                         <field name="marc" />
1912                         <field name="source" />
1913                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1914                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1915                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1916                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1917                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1918                 </fields>
1919                 <links>
1920                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1921                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1923                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1924                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1925                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1926                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1927                 </links>
1928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1929                         <actions>
1930                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1931                                 <retrieve/>
1932                                 <update permission="UPDATE_MARC" global_required="true"/>
1933                                 <delete permission="UPDATE_MARC" global_required="true"/>
1934                         </actions>
1935                 </permacrud>
1936         </class>
1937         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1939                         <field name="char_encoding" />
1940                         <field name="id" />
1941                         <field name="record" />
1942                         <field name="record_status" />
1943                         <field name="thesaurus" />
1944                 </fields>
1945                 <links>
1946                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1947                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
1948                 </links>
1949         </class>
1950         <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">
1951                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1952                         <field name="id" reporter:datatype="id" />
1953                         <field name="bib" reporter:datatype="link" />
1954                         <field name="authority" reporter:datatype="link" />
1955                 </fields>
1956                 <links>
1957                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1958                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1959                 </links>
1960         </class>
1961         <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">
1962                 <fields oils_persist:primary="code" oils_persist:sequence="">
1963                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1964                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1965                 </fields>
1966                 <links/>
1967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1968             <actions>
1969                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1970                 <retrieve/>
1971                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1972                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1973             </actions>
1974         </permacrud>
1975         </class>
1976         <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">
1977                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1978                         <field name="accepting_usr" />
1979                         <field name="amount" reporter:datatype="money" />
1980                         <field name="amount_collected" reporter:datatype="money" />
1981                         <field name="approval_code" reporter:datatype="text"/>
1982                         <field name="cash_drawer" reporter:datatype="link"/>
1983                         <field name="cc_first_name" reporter:datatype="text"/>
1984                         <field name="cc_last_name" reporter:datatype="text"/>
1985                         <field name="cc_number" reporter:datatype="text"/>
1986                         <field name="cc_order_number" reporter:datatype="text"/>
1987                         <field name="cc_type" reporter:datatype="text"/>
1988                         <field name="cc_processor" reporter:datatype="text"/>
1989                         <field name="expire_month" reporter:datatype="int" />
1990                         <field name="expire_year" reporter:datatype="int" />
1991                         <field name="id" reporter:datatype="id" />
1992                         <field name="note" reporter:datatype="text"/>
1993                         <field name="payment_ts" reporter:datatype="timestamp"/>
1994                         <field name="xact" reporter:datatype="link"/>
1995                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1996                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1997                 </fields>
1998                 <links>
1999                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2000                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2001                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2002                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2003                 </links>
2004         </class>
2005         <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">
2006                 <fields oils_persist:primary="name">
2007                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2008                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2009                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2010                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2011                 </fields>
2012                 <links/>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2016                 <retrieve/>
2017                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2018                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2019             </actions>
2020         </permacrud>
2021         </class>
2022
2023         <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">
2024                 <fields oils_persist:primary="alias">
2025                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2026                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2027                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2028                 </fields>
2029                 <links>
2030                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2031                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2032                 </links>
2033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2034             <actions>
2035                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2036                 <retrieve/>
2037                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2038                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2039             </actions>
2040         </permacrud>
2041         </class>
2042
2043         <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">
2044                 <fields oils_persist:primary="name">
2045                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2046                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2047                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2048                 </fields>
2049                 <links>
2050                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2051                 </links>
2052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2053             <actions>
2054                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2055                 <retrieve/>
2056                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2057                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2058             </actions>
2059         </permacrud>
2060         </class>
2061
2062         <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">
2063                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2064                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2065                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2066                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2067                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2068                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2069                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2070                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2071                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2072                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2073                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2074                 </fields>
2075                 <links>
2076                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2077                 </links>
2078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2079             <actions>
2080                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2081                 <retrieve/>
2082                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2083                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2084             </actions>
2085         </permacrud>
2086         </class>
2087         <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">
2088                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2089                         <field name="id" reporter:datatype="id" />
2090                         <field name="name" reporter:datatype="text"/>
2091                         <field name="xpath" reporter:datatype="text"/>
2092                         <field name="format" reporter:datatype="link"/>
2093                         <field name="first_word" reporter:datatype="bool" />
2094                 </fields>
2095                 <links/>
2096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2097             <actions>
2098                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2099                 <retrieve/>
2100                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2101                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2102             </actions>
2103         </permacrud>
2104         </class>
2105         <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">
2106                 <fields oils_persist:primary="code" oils_persist:sequence="">
2107                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2108                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2109                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2110                 </fields>
2111                 <links/>
2112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2113             <actions>
2114                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2115                 <retrieve/>
2116                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2117                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2118             </actions>
2119         </permacrud>
2120         </class>
2121         <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">
2122                 <fields oils_persist:primary="code" oils_persist:sequence="">
2123                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2124                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2125                 </fields>
2126                 <links/>
2127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2128             <actions>
2129                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2130                 <retrieve/>
2131                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2132                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2133             </actions>
2134         </permacrud>
2135         </class>
2136     <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">
2137         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2138             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
2139             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2140             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2141             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2142         </fields>
2143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144             <actions>
2145                 <retrieve/>
2146             </actions>
2147         </permacrud>
2148     </class>
2149         <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">
2150                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2151                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2152                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2153                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2154                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2155                 </fields>
2156                 <links>
2157                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2158                 </links>
2159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2160             <actions>
2161                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2162                 <retrieve/>
2163                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2164                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2165             </actions>
2166         </permacrud>
2167         </class>
2168         <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">
2169                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_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_PREFIX" context_field="owning_lib"/>
2181                 <retrieve/>
2182                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2183                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2184             </actions>
2185         </permacrud>
2186         </class>
2187         <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">
2188                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2189                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2190                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2191                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2192                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2193                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2194                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2195                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2196                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2197                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2198                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2199                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2200                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2201                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2202                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2203                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2204                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2205                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2206                 </fields>
2207                 <links>
2208                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2209                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2210                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2211                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2212                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2213                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2214                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2215                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2216                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2217                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2218                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2219                 </links>
2220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2221             <actions>
2222                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2223                 <retrieve/>
2224                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2225                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2226             </actions>
2227         </permacrud>
2228         </class>
2229         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2230                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2231                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2232                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2233                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2234                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2235                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2236                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2237                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2238                 </fields>
2239                 <links>
2240                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2241                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2242         </links>
2243         </class>
2244         <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">
2245                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2246                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2247                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2248                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2249                 </fields>
2250                 <links>
2251                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2252                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2253                 </links>
2254         </class>
2255         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2256                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2257                         <field name="id" reporter:datatype="id" />
2258                         <field name="value" oils_persist:i18n="true" />
2259                 </fields>
2260                 <links/>
2261         </class>
2262         <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">
2263                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2264                         <field name="balance_owed" reporter:datatype="money" />
2265                         <field name="total_owed" reporter:datatype="money" />
2266                         <field name="total_paid" reporter:datatype="money" />
2267                         <field name="usr" reporter:datatype="link"/>
2268                 </fields>
2269                 <links>
2270                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2271         </links>
2272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2273             <actions>
2274                 <retrieve permission="VIEW_USER">
2275                     <context link="usr" field="home_ou"/>
2276                 </retrieve>
2277             </actions>
2278         </permacrud>
2279         </class>
2280         <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">
2281                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2282                         <field name="collector" />
2283                         <field name="enter_time" reporter:datatype="timestamp"/>
2284                         <field name="id" reporter:datatype="id" />
2285                         <field name="location" reporter:datatype="link"/>
2286                         <field name="usr" reporter:datatype="link"/>
2287                 </fields>
2288                 <links>
2289                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2290                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2291                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2292                 </links>
2293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2294             <actions>
2295                 <create permission="money.collections_tracker.create" context_field="location"/>
2296                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2297                 <delete permission="money.collections_tracker.create" context_field="location"/>
2298             </actions>
2299         </permacrud>
2300         </class>
2301         <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">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2303                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2304                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2305                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2306                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2307                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2308                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2309                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2310                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2311                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2312                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2313                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2314                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2315                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2316                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2317                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2318                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2319                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2320                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2321                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2322                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2323                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2324                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2325                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2326                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2327                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2328                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2329                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2332                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2333                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2334                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2335                 </fields>
2336                 <links>
2337                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2338                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2339                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2340                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2341                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2342                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2343                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2344                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2345                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2346                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2347                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2348                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2349                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2350                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2351                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2352                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2353                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2354                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2355                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2356                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2357                 </links>
2358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2359             <actions>
2360                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2361                 <retrieve/>
2362                 <update permission="UPDATE_MARC" global_required="true"/>
2363             </actions>
2364         </permacrud>
2365         </class>
2366         <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">
2367                 <fields oils_persist:primary="id">
2368                         <field name="dow_0_close" />
2369                         <field name="dow_0_open" />
2370                         <field name="dow_1_close" />
2371                         <field name="dow_1_open" />
2372                         <field name="dow_2_close" />
2373                         <field name="dow_2_open" />
2374                         <field name="dow_3_close" />
2375                         <field name="dow_3_open" />
2376                         <field name="dow_4_close" />
2377                         <field name="dow_4_open" />
2378                         <field name="dow_5_close" />
2379                         <field name="dow_5_open" />
2380                         <field name="dow_6_close" />
2381                         <field name="dow_6_open" />
2382                         <field name="id" reporter:datatype="id" />
2383                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2384                 </fields>
2385                 <links>
2386                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2387                 </links>
2388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2389             <actions>
2390                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2391                 <retrieve/>
2392                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2393                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2394             </actions>
2395         </permacrud>
2396         </class>
2397         <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">
2398                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2399                         <field name="id" reporter:datatype="id" />
2400                         <field name="record" reporter:datatype="link"/>
2401                         <field name="label" reporter:datatype="text"/>
2402                         <field name="label_sortkey" reporter:datatype="text"/>
2403                 </fields>
2404                 <links>
2405                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2406                 </links>
2407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2408             <actions>
2409                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2410                 <retrieve/>
2411                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2412                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2413             </actions>
2414         </permacrud>
2415         </class>
2416         <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">
2417                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2418                         <field name="id" reporter:datatype="id" />
2419                         <field name="target_copy" reporter:datatype="link" />
2420                         <field name="part" reporter:datatype="link"/>
2421                 </fields>
2422                 <links>
2423                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2424                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2425                 </links>
2426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2427             <actions>
2428                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2429                 <retrieve/>
2430                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2431                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2432             </actions>
2433         </permacrud>
2434         </class>
2435         <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">
2436                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2437                         <field name="close_end" reporter:datatype="timestamp" />
2438                         <field name="close_start" reporter:datatype="timestamp" />
2439                         <field name="id" reporter:datatype="id" />
2440                         <field name="org_unit" reporter:datatype="org_unit"/>
2441                         <field name="reason" reporter:datatype="text"/>
2442                 </fields>
2443                 <links>
2444                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2445                 </links>
2446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2447             <actions>
2448                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2449                 <retrieve/>
2450                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2451                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2452             </actions>
2453         </permacrud>
2454         </class>
2455         <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">
2456                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2457                         <field name="extended" reporter:datatype="interval"/>
2458                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2459                         <field name="max_renewals" reporter:datatype="int" />
2460                         <field name="name" reporter:datatype="text"/>
2461                         <field name="normal" reporter:datatype="interval"/>
2462                         <field name="shrt" reporter:datatype="interval"/>
2463                 </fields>
2464                 <links>
2465                 </links>
2466         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467             <actions>
2468                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2469                 <retrieve/>
2470                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2471                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2472             </actions>
2473         </permacrud>
2474         </class>
2475
2476         <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">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2478                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2480             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2481                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2482             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2483                 </fields>
2484                 <links>
2485             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2486                 </links>
2487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2488             <actions>
2489                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2490                 <retrieve/>
2491                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2492                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2493             </actions>
2494                 </permacrud>
2495         </class>
2496
2497         <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">
2498                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2499                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2500                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2501                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2502             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2503                 </fields>
2504                 <links>
2505                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2506                 </links>
2507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2508             <actions>
2509                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2510                 <retrieve/>
2511                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2512                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2513             </actions>
2514                 </permacrud>
2515         </class>
2516
2517         <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">
2518                 <fields oils_persist:primary="id" oils_persist:sequence="">
2519                         <field name="balance_owed" reporter:datatype="money"/>
2520                         <field name="id" reporter:datatype="id" />
2521                         <field name="last_billing_note" reporter:datatype="text"/>
2522                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2523                         <field name="last_billing_type" reporter:datatype="text"/>
2524                         <field name="last_payment_note" reporter:datatype="text"/>
2525                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2526                         <field name="last_payment_type" reporter:datatype="text"/>
2527                         <field name="total_owed" reporter:datatype="money"/>
2528                         <field name="total_paid" reporter:datatype="money"/>
2529                         <field name="usr" reporter:datatype="link"/>
2530                         <field name="xact_finish" reporter:datatype="timestamp" />
2531                         <field name="xact_start" reporter:datatype="timestamp" />
2532                         <field name="xact_type" reporter:datatype="text"/>
2533                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2534                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2535                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2536                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2537                         <field name="billing_location" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2541                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2542                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2543                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2544                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2545                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2546                 </links>
2547         </class>
2548         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2549                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2550                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2554                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2556                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2557                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2558                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2559                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2560                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2561                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2562                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2563                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2564                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2565                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2566                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2567                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2568                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2569                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2570                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2571                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2572                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2573                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2574                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2575                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2576                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2577                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2578                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2579                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2580                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2581                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2582                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2583                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2584                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2585                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2586                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2587                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2588                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2589                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2590                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2591                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2592                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2593                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2594                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2595                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2596                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2597                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2598                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2599                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2600                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2601                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2603                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2605                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2606                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2607                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2608                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2609                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2610                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2611                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2612                 </fields>
2613                 <links>
2614                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2615                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2616                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2617                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2618                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2619                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2620                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2621                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2622                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2623                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2624                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2625                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2626                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2627                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2628                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2629                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2630                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2631                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2632                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2633                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2634                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2635                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2636                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2637                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2638                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2639                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2640                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2641                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2642                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2643                 </links>
2644         </class>
2645
2646         <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">
2647                 <fields oils_persist:primary="name">
2648                         <field name="name" reporter:datatype="text"/>
2649                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2650                 </fields>
2651                 <links/>
2652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2653                         <actions>
2654                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2655                                 <retrieve/>
2656                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2657                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2658                         </actions>
2659                 </permacrud>
2660         </class>
2661         <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">
2662                 <fields oils_persist:primary="name">
2663                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2664                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2665                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2666                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2667                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2668                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2669                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2670                 </fields>
2671                 <links>
2672                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2673                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2674                 </links>
2675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2676                         <actions>
2677                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2678                                 <retrieve/>
2679                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2680                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2681                         </actions>
2682                 </permacrud>
2683         </class>
2684         <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">
2685                 <fields oils_persist:primary="name">
2686                         <field name="name" reporter:datatype="text"/>
2687                         <field name="label" reporter:datatype="text"/>
2688                         <field name="description" reporter:datatype="text"/>
2689                         <field name="datatype" reporter:datatype="text"/>
2690                         <field name="view_perm" reporter:datatype="link"/>
2691                         <field name="update_perm" reporter:datatype="link"/>
2692                         <field name="fm_class" reporter:datatype="text"/>
2693                         <field name="grp" reporter:datatype="link"/>
2694                 </fields>
2695                 <links>
2696                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2697                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2698                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2699                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2700                 </links>
2701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2702                         <actions>
2703                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2704                                 <retrieve/>
2705                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2706                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2707                         </actions>
2708                 </permacrud>
2709         </class>
2710         <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">
2711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2712                         <field name="id" />
2713                         <field name="name"  reporter:datatype="text"/>
2714                         <field name="org_unit" reporter:datatype="org_unit"/>
2715                         <field name="value"  reporter:datatype="text"/>
2716                 </fields>
2717                 <links>
2718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2719                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2720                 </links>
2721         </class>
2722         <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">
2723                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2724                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2725                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2726                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2727                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2728                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2729                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2730                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2731                 </fields>
2732                 <links>
2733                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2734                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2735                 </links>
2736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2737             <actions>
2738                 <create permission="CREATE_COPY_NOTE">
2739                     <context link="owning_copy" field="circ_lib"/>
2740                 </create>
2741                 <retrieve permission="VIEW_COPY_NOTES">
2742                     <context link="owning_copy" field="circ_lib"/>
2743                 </retrieve>
2744                 <update permission="UPDATE_COPY_NOTE">
2745                     <context link="owning_copy" field="circ_lib"/>
2746                 </update>
2747                 <delete permission="DELETE_COPY_NOTE">
2748                     <context link="owning_copy" field="circ_lib"/>
2749                 </delete>
2750             </actions>
2751         </permacrud>
2752         </class>
2753         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2754                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2755                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2756                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2757                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2758                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2759                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2760                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2761                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2762                 </fields>
2763                 <links>
2764                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2765                 </links>
2766         </class>
2767         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2768                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2769                         <field name="fingerprint"  reporter:datatype="text"/>
2770                         <field name="id" reporter:datatype="id" />
2771                         <field name="master_record" reporter:datatype="link"/>
2772                         <field name="mods"  reporter:datatype="text"/>
2773                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2774                 </fields>
2775                 <links>
2776                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2777                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2778                 </links>
2779         </class>
2780         <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">
2781                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2782                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2783                         <field name="name"  reporter:datatype="text"/>
2784                 </fields>
2785                 <links/>
2786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2787             <actions>
2788                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2789                 <retrieve/>
2790                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2791                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2792             </actions>
2793         </permacrud>
2794         </class>
2795         <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">
2796                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2797                         <field name="code"  reporter:datatype="text"/>
2798                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2799                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2800                 </fields>
2801                 <links/>
2802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2803             <actions>
2804                 <create permission="CREATE_PERM" global_required="true"/>
2805                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2806                 <update permission="UPDATE_PERM" global_required="true"/>
2807                 <delete permission="DELETE_PERM" global_required="true"/>
2808             </actions>
2809         </permacrud>
2810         </class>
2811         <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">
2812                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2813                         <field name="id" reporter:datatype="id" />
2814                         <field name="metarecord" reporter:datatype="link"/>
2815                         <field name="source" reporter:datatype="link"/>
2816                 </fields>
2817                 <links>
2818                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2819                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2820                 </links>
2821         </class>
2822         <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">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2824                         <field name="id" reporter:datatype="id" />
2825                         <field name="field" reporter:datatype="link"/>
2826                         <field name="source" reporter:datatype="link"/>
2827                         <field name="value"  reporter:datatype="text"/>
2828                 </fields>
2829                 <links>
2830                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2831                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2832                 </links>
2833         </class>
2834         <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">
2835                 <oils_persist:source_definition>
2836                         SELECT * FROM metabib.author_field_entry
2837                                                 UNION ALL
2838                         SELECT * FROM metabib.keyword_field_entry
2839                                                 UNION ALL
2840                         SELECT * FROM metabib.identifier_field_entry
2841                                                 UNION ALL
2842                         SELECT * FROM metabib.title_field_entry
2843                                                 UNION ALL
2844                         SELECT * FROM metabib.subject_field_entry
2845                                                 UNION ALL
2846                         SELECT * FROM metabib.series_field_entry
2847                 </oils_persist:source_definition>
2848                 <fields>
2849                         <field name="field" reporter:datatype="link"/>
2850                         <field name="id" reporter:datatype="id" />
2851                         <field name="source" reporter:datatype="link"/>
2852                         <field name="value"  reporter:datatype="text"/>
2853                 </fields>
2854                 <links>
2855                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2856                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2857                 </links>
2858         </class>
2859         <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">
2860                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2861                         <field name="field" reporter:datatype="link"/>
2862                         <field name="id" reporter:datatype="id" />
2863                         <field name="source" reporter:datatype="link"/>
2864                         <field name="value"  reporter:datatype="text"/>
2865                 </fields>
2866                 <links>
2867                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2869                 </links>
2870         </class>
2871         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2872                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2873                         <field name="accepting_usr" reporter:datatype="link"/>
2874                         <field name="amount" reporter:datatype="money" />
2875                         <field name="amount_collected" reporter:datatype="money" />
2876                         <field name="cash_drawer" reporter:datatype="link"/>
2877                         <field name="id" reporter:datatype="id" />
2878                         <field name="note"  reporter:datatype="text"/>
2879                         <field name="payment_ts" reporter:datatype="timestamp"/>
2880                         <field name="xact" reporter:datatype="link"/>
2881                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2882                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2883                 </fields>
2884                 <links>
2885                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2886                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2887                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2888                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2889                 </links>
2890         </class>
2891         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2892                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2893                         <field name="accepting_usr" reporter:datatype="link"/>
2894                         <field name="amount" reporter:datatype="money" />
2895                         <field name="amount_collected" reporter:datatype="money" />
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="xact" reltype="has_a" key="id" map="" class="mbt"/>
2907                 </links>
2908         </class>
2909         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2911                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2912                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2913                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2914                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2915                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2916                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2917                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2918                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2919                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2920                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2921                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2922                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2923                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2924                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2925                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2926                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2927                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2928                 </fields>
2929                 <links>
2930                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2931                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2932                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2933                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2934                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2935                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2936                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2937                 </links>
2938         </class>
2939
2940         <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">
2941                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2942                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2943                         <field name="name"  reporter:datatype="text"/>
2944                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2945                         <field name="block_list" reporter:datatype="text"/>
2946                         <field name="org_depth" reporter:datatype="int"/>
2947                 </fields>
2948                 <links/>
2949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2950             <actions>
2951                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2952                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2953                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2954                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2955             </actions>
2956         </permacrud>
2957         </class>
2958         <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">
2959                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2960                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2961                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2962                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2963                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2964                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2965                 </fields>
2966                 <links>
2967                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2968                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2969                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2970         </links>
2971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2972             <actions>
2973                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2974                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2975                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2976                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2977             </actions>
2978         </permacrud>
2979         </class>
2980         <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">
2981                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2982                         <field name="holdable" reporter:datatype="bool"/>
2983                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2984                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2985                         <field name="opac_visible" reporter:datatype="bool"/>
2986             <field name="copy_active" reporter:datatype="bool"/>
2987                 </fields>
2988                 <links/>
2989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2990             <actions>
2991                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2992                 <retrieve/>
2993                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2994                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2995             </actions>
2996         </permacrud>
2997         </class>
2998         <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">
2999                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3000                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3001                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3002                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3003                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3004                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3005                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3006                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3007                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3008                 </fields>
3009                 <links>
3010                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3011                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3012                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3013                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3014                 </links>
3015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3016                         <actions>
3017                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3018                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3019                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3020                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3021                         </actions>
3022                 </permacrud>
3023         </class>
3024         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3025                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3026                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3027                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3028                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3029                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3030                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3031                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3032                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3033                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3034                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3035                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3036                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3037                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3038                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3039                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3040                 </fields>
3041                 <links>
3042                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3043                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3044                 </links>
3045         </class>
3046
3047         <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">
3048                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3049                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3050                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3051                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3052                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3053                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3054                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3055                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3056                 </fields>
3057                 <links>
3058                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3059                 </links>
3060         </class>
3061
3062         <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">
3063                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3064                         <field name="call_number" />
3065                         <field name="create_date" reporter:datatype="timestamp"/>
3066                         <field name="creator" reporter:datatype="link"/>
3067                         <field name="id" reporter:datatype="id" />
3068                         <field name="pub" reporter:datatype="bool"/>
3069                         <field name="title"  reporter:datatype="text"/>
3070                         <field name="value"  reporter:datatype="text"/>
3071                 </fields>
3072                 <links>
3073                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3074                 </links>
3075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3076             <actions>
3077                 <create permission="CREATE_VOLUME_NOTE">
3078                     <context link="call_number" field="owning_lib"/>
3079                 </create>
3080                 <retrieve permission="VIEW_VOLUME_NOTES">
3081                     <context link="call_number" field="owning_lib"/>
3082                 </retrieve>
3083                 <update permission="UPDATE_VOLUME_NOTE">
3084                     <context link="call_number" field="owning_lib"/>
3085                 </update>
3086                 <delete permission="DELETE_VOLUME_NOTE">
3087                     <context link="call_number" field="owning_lib"/>
3088                 </delete>
3089             </actions>
3090         </permacrud>
3091         </class>
3092         <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">
3093                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3094                         <field name="create_date" reporter:datatype="timestamp"/>
3095                         <field name="creator" reporter:datatype="link"/>
3096                         <field name="edit_date" reporter:datatype="timestamp"/>
3097                         <field name="editor" reporter:datatype="link"/>
3098                         <field name="id" reporter:datatype="id" />
3099                         <field name="record" reporter:datatype="link"/>
3100                         <field name="value" reporter:datatype="text"/>
3101                 </fields>
3102                 <links>
3103                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3104                 </links>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3108                 <retrieve/>
3109                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3110                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3115         <oils_persist:source_definition>
3116 SELECT  usr,
3117         SUM(
3118             CASE
3119                 WHEN (
3120                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3121                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3122                 ) THEN 1
3123                 ELSE 0
3124             END
3125         ) AS out,
3126
3127         SUM(
3128             CASE
3129                 WHEN (
3130                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3131                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3132                 ) THEN 1
3133                 ELSE 0
3134             END
3135         ) AS overdue,
3136
3137         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3138         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3139         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3140   FROM  action.circulation
3141   WHERE checkin_time IS NULL
3142   GROUP BY 1
3143         </oils_persist:source_definition>
3144         <fields oils_persist:primary="usr">
3145             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3146             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3147             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3148             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3149             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3150             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3151         </fields>
3152         <links>
3153             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3154         </links>
3155         </class>
3156         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3157         <oils_persist:source_definition>
3158 SELECT  usr,
3159         ARRAY_TO_STRING(ARRAY_ACCUM(
3160             CASE
3161                 WHEN (
3162                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3163                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3164                 ) THEN id
3165                 ELSE 0
3166             END
3167         ),',') AS out,
3168
3169         ARRAY_TO_STRING(ARRAY_ACCUM(
3170             CASE
3171                 WHEN (
3172                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3173                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3174                 ) THEN id
3175                 ELSE 0
3176             END
3177         ),',') AS overdue,
3178
3179         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3180         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3181         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3182   FROM  action.circulation
3183   WHERE checkin_time IS NULL
3184   GROUP BY 1
3185         </oils_persist:source_definition>
3186         <fields oils_persist:primary="usr">
3187             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3188             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3189             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3190             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3191             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3192             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3193         </fields>
3194         <links>
3195             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3196         </links>
3197         </class>
3198         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3199                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3200                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3201                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3202                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3203                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3204                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3205                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3206                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3207                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3208                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3209                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3210                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3211                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3212                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3213                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3214                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3215                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3216                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3217                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3218                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3219                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3220                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3221                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3222                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3223                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3224                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3225                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3226                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3227                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3228                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3229                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3230                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3231                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3232                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3233                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3234                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3235                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3236                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3237                 </fields>
3238                 <links>
3239                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3240                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3241                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3242                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3243                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3244                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3245                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3246                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3247                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3248                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3249                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3250                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3251                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3252                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3253                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3254                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3255                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3256                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3257                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3258                 </links>
3259         </class>
3260         <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">
3261                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3262                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3263                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3264                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3265                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3266                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3267                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3268                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3269                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3270                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3271                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3272                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3273                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3274                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3275                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3276                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3277                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3278                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3279                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3280                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3281                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3282                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3283                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3284                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3285                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3286                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3287                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3288                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3289                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3290                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3291                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3292                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3293                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3294                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3295                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3296                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3297                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3298                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3299                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3300                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3301                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3302                 </fields>
3303                 <links>
3304                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3305                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3306                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3307                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3308                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3309                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3310                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3311                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3312                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3313                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3314                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3315                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3316                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3317                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3318                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3319                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3320                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3321                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3322                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3323                 </links>
3324         </class>
3325         <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">
3326                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3327                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3328                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3329                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3330                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3331                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3332                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3333                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3334                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3335                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3336                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3337                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3338                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3339                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3340                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3341                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3342                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3343                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3344                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3345                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3346                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3347                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3348                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3349                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3350                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3351                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3352                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3353                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3354                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3355                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3356                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3357                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3358                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3359                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3360                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3361                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3362                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3363                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3364                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3365                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3366                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3367                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3368                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3369                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3370                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3371                 </fields>
3372                 <links>
3373                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3374                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3375                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3376                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3377                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3378                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3379                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3380                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3381                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3382                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3383                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3384                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3385                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3386                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3387                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3388                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3389                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3390                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3391                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3392                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3393                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3394                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3395                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3396                 </links>
3397         </class>
3398
3399         <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">
3400                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3401                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3402                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3403                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3404                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3405                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3406                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3407                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3408                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3409                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3410                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3411                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3412                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3413                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3414                 </fields>
3415                 <links>
3416                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3417                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3418                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3419                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3420                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3421                 </links>
3422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3423                         <actions>
3424                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3425                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3426                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3427                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3428                         </actions>
3429                 </permacrud>
3430         </class>
3431
3432         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3433                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3434                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3435                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3436                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3437                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3438                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3439                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3440                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3441                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3442                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3443                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3444                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3445                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3446                 </fields>
3447                 <links>
3448                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3449                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3450                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3451                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3452                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3453                 </links>
3454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455                         <actions>
3456                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3457                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3458                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3459                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3460                         </actions>
3461                 </permacrud>
3462         </class>
3463         
3464         <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">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3466                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3467                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3468                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3469                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3470                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3471                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3472                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3473                 </fields>
3474                 <links>
3475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3476                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3477                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3478                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3479                 </links>
3480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3481                         <actions>
3482                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3483                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3484                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3485                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3486                         </actions>
3487                 </permacrud>
3488         </class>
3489         
3490         <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">
3491                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3492                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3493                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3494                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3495                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3496                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3497                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3498                 </fields>
3499                 <links>
3500                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3501                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3502                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3503                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3504                 </links>
3505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3506                         <actions>
3507                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3508                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3509                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3510                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3511                         </actions>
3512                 </permacrud>
3513         </class>
3514         
3515         <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">
3516                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3517                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3518                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3519                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3520                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3521                 </fields>
3522                 <links>
3523                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3524                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3525                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3526                 </links>
3527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3528                         <actions>
3529                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3530                     <context link="resource" field="owner" />
3531                 </create>
3532                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3533                     <context link="resource" field="owner" />
3534                 </retrieve>
3535                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3536                     <context link="resource" field="owner" />
3537                 </update>
3538                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3539                     <context link="resource" field="owner" />
3540                 </delete>
3541                         </actions>
3542                 </permacrud>
3543         </class>
3544         
3545         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3547                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3548                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3549                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3550                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3551                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3552                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3553                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3554                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3555                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3556                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3557                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3558                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3559                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3560                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3561                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3562                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3563                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3564                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3565                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3566                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3567                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3568                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3569                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3570                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3571                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3572                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3573                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3574                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3575                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3576                 </fields>
3577                 <links>
3578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3579                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3580                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3581                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3582                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3583                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3584                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3585                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3586                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3587                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3588                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3589                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3590                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3591                 </links>
3592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3593                         <actions>
3594                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3595                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3596                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3597                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3598                         </actions>
3599                 </permacrud>
3600         </class>
3601         
3602         <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">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3604                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3605                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3606                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3607                 </fields>
3608                 <links>
3609                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3610                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3611                 </links>
3612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3613                         <actions>
3614                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3615                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3616                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3617                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3618                         </actions>
3619                 </permacrud>
3620         </class>
3621
3622         <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">
3623                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3624                         <field name="bucket" reporter:datatype="link"/>
3625                         <field name="id" reporter:datatype="id" />
3626                         <field name="target_call_number" reporter:datatype="link" />
3627                         <field name="create_time" reporter:datatype="timestamp" />
3628                         <field name="pos" reporter:datatype="int" />
3629                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3630                 </fields>
3631                 <links>
3632                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3633                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3634             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3635                 </links>
3636         </class>
3637         <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">
3638                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3639                         <field name="id" reporter:datatype="id" />
3640                         <field name="item" reporter:datatype="link"/>
3641                         <field name="note" reporter:datatype="text" />
3642                 </fields>
3643                 <links>
3644                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3645                 </links>
3646         </class>
3647         <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">
3648                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3649                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3650                         <field name="btype" reporter:datatype="text"/>
3651                         <field name="id" reporter:datatype="id" />
3652                         <field name="name" reporter:datatype="text"/>
3653                         <field name="description" reporter:datatype="text"/>
3654                         <field name="owner" reporter:datatype="link"/>
3655                         <field name="pub" reporter:datatype="bool"/>
3656                         <field name="create_time" reporter:datatype="timestamp" />
3657                 </fields>
3658                 <links>
3659                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3660                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3661                 </links>
3662         </class>
3663         <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">
3664                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3665                         <field name="id" reporter:datatype="id" />
3666                         <field name="bucket" reporter:datatype="link"/>
3667                         <field name="note" reporter:datatype="text" />
3668                 </fields>
3669                 <links>
3670                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3671                 </links>
3672         </class>
3673         <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">
3674                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3675                         <field name="hold" reporter:datatype="link"/>
3676                         <field name="id" reporter:datatype="id" />
3677                         <field name="target_copy" reporter:datatype="link"/>
3678                 </fields>
3679                 <links>
3680                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3681                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3682                 </links>
3683         </class>
3684         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3685                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3686                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3687                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3688                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3689                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3690                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3691                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3692                 </fields>
3693                 <links>
3694                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3695                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3696                 </links>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3700                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3701                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3702                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3703                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3704                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3705                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3706                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3707                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3708                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3709                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3710                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3711                 </fields>
3712                 <links>
3713                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3714                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3715                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3716                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3717                 </links>
3718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3719             <actions>
3720                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3721                 <retrieve/>
3722                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3723                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3724             </actions>
3725         </permacrud>
3726         </class>
3727
3728     <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">
3729         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3730             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3731             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3732             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3733             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3734         </fields>
3735         <links>
3736             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3737             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3738         </links>
3739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3740             <actions>
3741                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3742                 <retrieve/>
3743                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3744                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3745             </actions>
3746         </permacrud>
3747     </class>
3748
3749         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3750                 <fields>
3751                         <field name="sre_id" oils_persist:virtual="true" />
3752                         <field name="location" oils_persist:virtual="true" />
3753                         <field name="owning_lib" oils_persist:virtual="true" />
3754                         <field name="basic_holdings" oils_persist:virtual="true" />
3755                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3756                         <field name="supplement_holdings" oils_persist:virtual="true" />
3757                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3758                         <field name="index_holdings" oils_persist:virtual="true" />
3759                         <field name="index_holdings_add" oils_persist:virtual="true" />
3760                         <field name="online" oils_persist:virtual="true" />
3761                         <field name="missing" oils_persist:virtual="true" />
3762                         <field name="incomplete" oils_persist:virtual="true" />
3763                 </fields>
3764         </class>
3765
3766         <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">
3767                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3768                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3769                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3770                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3771                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3772                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3773                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3774                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3775                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3776                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3777                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3778                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3779                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3780                 </fields>
3781                 <links>
3782                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3783                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3784                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3785                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3786                 </links>
3787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3788                         <actions>
3789                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3790                                 <retrieve/>
3791                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3792                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3793                         </actions>
3794                 </permacrud>
3795         </class>
3796
3797         <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">
3798                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3799                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3800                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3801                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3802                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3803                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3804                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3805                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3806                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3807                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3808                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3809                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3810                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3811                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3812                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3813                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3814                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3815                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3816                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3817                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3818                 </fields>
3819                 <links>
3820                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3821                 </links>
3822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3823                         <actions>
3824                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3825                                         <context link="subscription" field="owning_lib" />
3826                                 </create>
3827                                 <retrieve />
3828                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3829                                         <context link="subscription" field="owning_lib" />
3830                                 </update>
3831                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3832                                         <context link="subscription" field="owning_lib" />
3833                                 </delete>
3834                         </actions>
3835                 </permacrud>
3836         </class>
3837
3838         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3839                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3840                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3841                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3842                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3843                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3844                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3845                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3846                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3847                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3848                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3849                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3850                 </fields>
3851                 <links>
3852                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3853                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3854                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3855                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3856                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3857                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3858                 </links>
3859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3860                         <actions>
3861                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3862                                 <retrieve />
3863                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3864                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3865                         </actions>
3866                 </permacrud>
3867         </class>
3868
3869         <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">
3870                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3871                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3872                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3873                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3874                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3875                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3876                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3877                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3878                 </fields>
3879                 <links>
3880                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3881                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3882                 </links>
3883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3884                 </permacrud>
3885         </class>
3886
3887         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3889                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3890                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3891                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3892                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3893                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3894                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3895                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3896                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3897                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3898                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3899                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3900                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3901                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3902                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3903                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3904                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3905                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3906                 </fields>
3907                 <links>
3908                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3909                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3910                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3911                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3912                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3913                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3914                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3915                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3916                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3917                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3918                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3919                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3920                 </links>
3921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3922                         <actions>
3923                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3924                                 <retrieve />
3925                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3926                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3927                         </actions>
3928                 </permacrud>
3929         </class>
3930
3931         <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">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3933                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3934                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3935                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3936                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3937                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3938                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3939                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3940                 </fields>
3941                 <links>
3942                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3943                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3944                 </links>
3945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3946                         <actions>
3947                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3948                                         <context link="distribution" field="holding_lib" />
3949                                 </create>
3950                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3951                                         <context link="distribution" field="holding_lib" />
3952                                 </retrieve>
3953                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3954                                         <context link="distribution" field="holding_lib" />
3955                                 </update>
3956                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3957                                         <context link="distribution" field="holding_lib" />
3958                                 </delete>
3959                         </actions>
3960                 </permacrud>
3961         </class>
3962
3963         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3964                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3965                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3966                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3967                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3968                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3969                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3970                 </fields>
3971                 <links>
3972                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3973                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3974                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3975                 </links>
3976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3977                         <actions>
3978                                 <create permission="ADMIN_SERIAL_STREAM">
3979                                         <context link="distribution" field="holding_lib" />
3980                                 </create>
3981                                 <retrieve />
3982                                 <update permission="ADMIN_SERIAL_STREAM">
3983                                         <context link="distribution" field="holding_lib" />
3984                                 </update>
3985                                 <delete permission="ADMIN_SERIAL_STREAM">
3986                                         <context link="distribution" field="holding_lib" />
3987                                 </delete>
3988                         </actions>
3989                 </permacrud>
3990         </class>
3991
3992         <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">
3993                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3994                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3995                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3996                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3997                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3998                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3999                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4000                 </fields>
4001                 <links>
4002                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4003                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4004                 </links>
4005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4006                         <actions>
4007                                 <create permission="ADMIN_SERIAL_STREAM">
4008                                         <context link="stream" jump="distribution" field="holding_lib" />
4009                                 </create>
4010                                 <retrieve permission="RECEIVE_SERIAL">
4011                                         <context link="stream" jump="distribution" field="holding_lib" />
4012                                 </retrieve>
4013                                 <update permission="ADMIN_SERIAL_STREAM">
4014                                         <context link="stream" jump="distribution" field="holding_lib" />
4015                                 </update>
4016                                 <delete permission="ADMIN_SERIAL_STREAM">
4017                                         <context link="stream" jump="distribution" field="holding_lib" />
4018                                 </delete>
4019                         </actions>
4020                 </permacrud>
4021         </class>
4022
4023         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4024                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4025                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4026                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4027                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4028                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4029                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4030                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4031                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4032                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4033                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4034                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4035                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4036                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4037                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4038                 </fields>
4039                 <links>
4040                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4041                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4042                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4043                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4044                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4045                 </links>
4046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047                         <actions>
4048                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4049                                         <context link="subscription" field="owning_lib" />
4050                                 </create>
4051                                 <retrieve/>
4052                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4053                                         <context link="subscription" field="owning_lib" />
4054                                 </update>
4055                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4056                                         <context link="subscription" field="owning_lib" />
4057                                 </delete>
4058                         </actions>
4059                 </permacrud>
4060         </class>
4061
4062         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4063                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4064                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4065                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4066                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4067                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4068                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4069                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4070                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4071                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4072                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4073                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4074                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4075                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4076                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4077                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4078                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4079                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4080                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4081                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4082                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4083                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4084                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4085                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4086                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4087                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4088                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4089                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4090                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4091                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4092                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4093                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4094                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4095                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4096                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4097                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4098                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4099                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4100                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4101                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4102                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4103                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4104                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4105                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4106                 </fields>
4107                 <links>
4108                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4109                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4110                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4111                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4112                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4113                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4114                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4115                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4116                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4117                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4118                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4119                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4120                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4121                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4122                 </links>
4123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4124                         <actions>
4125                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4126                                 <retrieve/>
4127                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4128                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4129                         </actions>
4130                 </permacrud>
4131         </class>
4132
4133         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4134                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4136                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4137                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4138                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4139                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4140                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4141                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4142                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4143                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4144                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4145                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4146                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4147                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4148                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4149                 </fields>
4150                 <links>
4151                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4152                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4153                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4154                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4155                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4156                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4157                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4158                 </links>
4159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4160                         <actions>
4161                                 <create permission="ADMIN_SERIAL_ITEM">
4162                                         <context link="stream" jump="distribution" field="holding_lib" />
4163                                 </create>
4164                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4165                                         <context link="stream" jump="distribution" field="holding_lib" />
4166                                 </retrieve>
4167                                 <update permission="ADMIN_SERIAL_ITEM">
4168                                         <context link="stream" jump="distribution" field="holding_lib" />
4169                                 </update>
4170                                 <delete permission="ADMIN_SERIAL_ITEM">
4171                                         <context link="stream" jump="distribution" field="holding_lib" />
4172                                 </delete>
4173                         </actions>
4174                 </permacrud>
4175         </class>
4176
4177         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4178                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4179                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4180                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4181                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4182                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4183                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4184                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4185                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4186                 </fields>
4187                 <links>
4188                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4189                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4190                 </links>
4191                 <!-- Not available via PCRUD at this time -->
4192         </class>
4193
4194         <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">
4195                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4196                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4197                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4198                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4199                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4200                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4201                 </fields>
4202                 <links>
4203                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4204                 </links>
4205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4206                         <actions>
4207                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4208                                         <context link="distribution" field="holding_lib" />
4209                                 </create>
4210                                 <retrieve/>
4211                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4212                                         <context link="distribution" field="holding_lib" />
4213                                 </update>
4214                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4215                                         <context link="distribution" field="holding_lib" />
4216                                 </create>
4217                         </actions>
4218                 </permacrud>
4219         </class>
4220
4221         <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">
4222                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4223                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4224                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4225                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4226                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4227                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4228                 </fields>
4229                 <links>
4230                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4231                 </links>
4232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4233                         <actions>
4234                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4235                                         <context link="distribution" field="holding_lib" />
4236                                 </create>
4237                                 <retrieve/>
4238                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4239                                         <context link="distribution" field="holding_lib" />
4240                                 </update>
4241                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4242                                         <context link="distribution" field="holding_lib" />
4243                                 </create>
4244                         </actions>
4245                 </permacrud>
4246         </class>
4247
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4250                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4251                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4252                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4253                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4254                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4255                 </fields>
4256                 <links>
4257                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4258                 </links>
4259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4260                         <actions>
4261                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4262                                         <context link="distribution" field="holding_lib" />
4263                                 </create>
4264                                 <retrieve/>
4265                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4266                                         <context link="distribution" field="holding_lib" />
4267                                 </update>
4268                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4269                                         <context link="distribution" field="holding_lib" />
4270                                 </create>
4271                         </actions>
4272                 </permacrud>
4273         </class>
4274
4275         <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">
4276                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4277                         <field name="id" reporter:datatype="id" />
4278                         <field name="owning_copy" reporter:datatype="link"/>
4279                         <field name="stat_cat" reporter:datatype="link"/>
4280                         <field name="stat_cat_entry" reporter:datatype="link"/>
4281                 </fields>
4282                 <links>
4283                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4284                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4285                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4286                 </links>
4287         </class>
4288         <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">
4289                 <fields oils_persist:primary="code">
4290                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4291                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4292                 </fields>
4293                 <links/>
4294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4295             <actions>
4296                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4297                 <retrieve/>
4298                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4299                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4300             </actions>
4301         </permacrud>
4302         </class>
4303         <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">
4304                 <fields oils_persist:primary="code">
4305                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4306                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4307                 </fields>
4308                 <links/>
4309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4310             <actions>
4311                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4312                 <retrieve/>
4313                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4314                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4315             </actions>
4316         </permacrud>
4317         </class>
4318         <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">
4319                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4320                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4321                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4322                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4323                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4324                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4325                 </fields>
4326                 <links>
4327             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4328         </links>
4329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4330             <actions>
4331                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4332                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4333                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4334                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4335             </actions>
4336         </permacrud>
4337         </class>
4338         <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">
4339                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4340                         <field name="id" reporter:datatype="id" />
4341                         <field name="name" reporter:datatype="text"/>
4342                 </fields>
4343                 <links/>
4344         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4345             <actions>
4346                 <create permission="CREATE_LASSO" global_required="true"/>
4347                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4348                 <update permission="UPDATE_LASSO" global_required="true"/>
4349                 <delete permission="DELETE_LASSO" global_required="true"/>
4350             </actions>
4351         </permacrud>
4352         </class>
4353         <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">
4354                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4355                         <field name="id" reporter:datatype="id" />
4356                         <field name="lasso" reporter:datatype="link"/>
4357                         <field name="org_unit" reporter:datatype="org_unit"/>
4358                 </fields>
4359                 <links>
4360                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4361                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4362                 </links>
4363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4364             <actions>
4365                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4366                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4367                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4368                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4369             </actions>
4370         </permacrud>
4371         </class>
4372         <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">
4373                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4374                         <field name="id" reporter:datatype="id" />
4375                         <field name="from_org" reporter:datatype="org_unit"/>
4376                         <field name="to_org" reporter:datatype="org_unit"/>
4377                         <field name="prox" reporter:datatype="int" />
4378                 </fields>
4379                 <links>
4380                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4381                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4382                 </links>
4383         </class>
4384         <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">
4385                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4386                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4387                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4388                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4389                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4390                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4391                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4392                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4393                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4394                 </fields>
4395                 <links/>
4396         </class>
4397         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4398                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4399                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4400                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4401                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4402                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4403                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4404                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4405                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4406                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4407                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4408                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4409                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4410                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4411                 </fields>
4412                 <links>
4413                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4414                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4415                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4416                 </links>
4417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4418             <actions>
4419                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4420                 <retrieve/>
4421                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4422                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4423             </actions>
4424         </permacrud>
4425         </class>
4426         <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">
4427                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4428                         <field name="address_type"  reporter:datatype="text"/>
4429                         <field name="city"  reporter:datatype="text"/>
4430                         <field name="country"  reporter:datatype="text"/>
4431                         <field name="county"  reporter:datatype="text"/>
4432                         <field name="id" reporter:datatype="id" />
4433                         <field name="org_unit" reporter:datatype="org_unit"/>
4434                         <field name="post_code"  reporter:datatype="text"/>
4435                         <field name="state"  reporter:datatype="text"/>
4436                         <field name="street1"  reporter:datatype="text"/>
4437                         <field name="street2"  reporter:datatype="text"/>
4438                         <field name="valid" reporter:datatype="bool"/>
4439                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4440                 </fields>
4441                 <links>
4442                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4443                 </links>
4444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4445             <actions>
4446                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4447                 <retrieve/>
4448                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4449                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4450             </actions>
4451         </permacrud>
4452         </class>
4453         <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">
4454                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4455                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4456                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4457                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4458                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4459                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4460                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4461                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4462                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4463                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4464                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4465                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4466                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4467                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4468                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4469                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4470                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4471                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4472                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4473                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4474                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4475                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4476                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4477                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4478                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4479                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4480                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4481                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4482                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4483                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4484                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4485                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4486                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4487                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4488                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4489                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4490                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4491                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4492                 </fields>
4493                 <links>
4494                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4495                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4496                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4497                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4498                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4499                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4500                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4501                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4502                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4503                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4504                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4505                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4506                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4507                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4508                 </links>
4509         </class>
4510         <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">
4511                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4512                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4513                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4514                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4515                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4516                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4517                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4518                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4519                 </fields>
4520                 <links>
4521                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4522                 </links>
4523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4524                         <actions>
4525                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4526                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4527                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4528                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4529                         </actions>
4530                 </permacrud>
4531         </class>
4532         <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">
4533                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4534                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4535                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4536                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4537                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4538                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4539                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4540                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4541                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4542                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4543                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4544                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4545                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4546                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4547                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4548                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4549                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4550                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4551                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4555                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4556                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4557                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4558                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4559                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4560                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4561                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4562                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4563                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4564                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4565                 </fields>
4566                 <links>
4567                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4568                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4569                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4570                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4571                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4572                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4573                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4574                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4575                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4576                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4577                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4578                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4579                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4580                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4581                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4582                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4583                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4584                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4585                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4586                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4587                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4588                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4589                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4590                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4591                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4592                 </links>
4593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4594             <actions>
4595                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4596                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4597                     <context field="id"/>
4598                     <context field="parent_ou"/>
4599                                 </retrieve>
4600                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4601                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4602             </actions>
4603         </permacrud>
4604         </class>
4605         <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">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4607                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4608                         <field name="btype" reporter:datatype="text"/>
4609                         <field name="id" reporter:datatype="id" />
4610                         <field name="name"  reporter:datatype="text"/>
4611                         <field name="description" reporter:datatype="text"/>
4612                         <field name="owner" reporter:datatype="link"/>
4613                         <field name="pub" reporter:datatype="bool"/>
4614                         <field name="create_time" reporter:datatype="timestamp" />
4615                 </fields>
4616                 <links>
4617                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4618                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4619                 </links>
4620         </class>
4621         <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">
4622                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4623                         <field name="id" reporter:datatype="id" />
4624                         <field name="bucket" reporter:datatype="link"/>
4625                         <field name="note" reporter:datatype="text" />
4626                 </fields>
4627                 <links>
4628                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4629                 </links>
4630         </class>
4631         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4632                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4633                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4634                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4635                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4636                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4637                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4638                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4639                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4640                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4641                 </fields>
4642                 <links>
4643                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4644                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4645                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4646                 </links>
4647         </class>
4648         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4649                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4650                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4651                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4652                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4653                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4654                 </fields>
4655                 <links>
4656                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4657                 </links>
4658         </class>
4659     <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">
4660         <fields oils_persist:primary="field">
4661             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4662             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4663             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4664         </fields>
4665         <links/>
4666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4667             <actions>
4668                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4669                 <retrieve />
4670                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4671                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4672             </actions>
4673         </permacrud>
4674     </class>
4675         <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">
4676                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4677                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4678                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4679                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4680                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4681                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4682                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4683                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4684                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4685                 </fields>
4686                 <links>
4687                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4688                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4689                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4690                 </links>
4691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4692             <actions>
4693                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4694                 <retrieve />
4695                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4696                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4697             </actions>
4698         </permacrud>
4699         </class>
4700         <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">
4701                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4702                         <field name="field" reporter:datatype="link"/>
4703                         <field name="id" reporter:datatype="id" />
4704                         <field name="source" reporter:datatype="link"/>
4705                         <field name="value"  reporter:datatype="text"/>
4706                 </fields>
4707                 <links>
4708                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4709                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4710                 </links>
4711         </class>
4712         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4713                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4714                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4715                         <field name="btype" reporter:datatype="text"/>
4716                         <field name="id" reporter:datatype="id" />
4717                         <field name="name"  reporter:datatype="text"/>
4718                         <field name="description" reporter:datatype="text"/>
4719                         <field name="owner" reporter:datatype="link"/>
4720                         <field name="pub" reporter:datatype="bool"/>
4721                         <field name="create_time" reporter:datatype="timestamp" />
4722                 </fields>
4723                 <links>
4724                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4725                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4726                 </links>
4727         </class>
4728         <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">
4729                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4730                         <field name="id" reporter:datatype="id" />
4731                         <field name="bucket" reporter:datatype="link"/>
4732                         <field name="note" reporter:datatype="text" />
4733                 </fields>
4734                 <links>
4735                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4736                 </links>
4737         </class>
4738         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4739                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4740                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4741                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4742                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4743                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4744                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4745                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4746                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4747                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4748                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4749                 </fields>
4750                 <links>
4751                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4752                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4753                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4754                 </links>
4755         </class>
4756         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4757                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4758                         <field name="id" reporter:datatype="id" />
4759                         <field name="ind1" />
4760                         <field name="ind2" />
4761                         <field name="record" />
4762                         <field name="subfield" />
4763                         <field name="tag" />
4764                         <field name="value" />
4765                 </fields>
4766                 <links>
4767                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4768                 </links>
4769         </class>
4770         <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">
4771                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4772                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4773                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4774                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4775                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4776                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4777                 </fields>
4778                 <links>
4779                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4780                 </links>
4781         </class>
4782         <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">
4783                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4784                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4785                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4786                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4787                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4788                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4789                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4790                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4791                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4792                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4793                 </fields>
4794                 <links>
4795                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4796                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4797                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4798                 </links>
4799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4800             <actions>
4801                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4802                 <retrieve/>
4803                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4804                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4805             </actions>
4806         </permacrud>
4807         </class>
4808         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4809                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4810                         <field name="create_date" reporter:datatype="timestamp"/>
4811                         <field name="creator" reporter:datatype="link"/>
4812                         <field name="edit_date" reporter:datatype="timestamp"/>
4813                         <field name="editor" reporter:datatype="link"/>
4814                         <field name="id" reporter:datatype="id" />
4815                         <field name="pub" reporter:datatype="bool"/>
4816                         <field name="record" reporter:datatype="link"/>
4817                         <field name="value"  reporter:datatype="text"/>
4818                 </fields>
4819                 <links>
4820                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4821                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4822                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4823                 </links>
4824         </class>
4825         <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">
4826                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4827                         <field name="balance_owed" reporter:datatype="money" />
4828                         <field name="total_owed" reporter:datatype="money" />
4829                         <field name="total_paid" reporter:datatype="money" />
4830                         <field name="usr" reporter:datatype="link"/>
4831                 </fields>
4832                 <links>
4833                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4834                 </links>
4835         </class>
4836         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4837                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4838                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4839                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4840                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4841                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4842                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4843                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4844                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4845                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4846                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4847                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4848                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4849                 </fields>
4850                 <links>
4851                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4852                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4853                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4854                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4855                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4856                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4857                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4858                 </links>
4859         </class>
4860         <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">
4861                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4862                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4863                         <field name="quality" reporter:datatype="int" />
4864                         <field name="source" reporter:datatype="text"/>
4865                         <field name="transcendant" reporter:datatype="bool"/>
4866                 </fields>
4867                 <links/>
4868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4869             <actions>
4870                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4871                 <retrieve/>
4872                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4873                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4874             </actions>
4875         </permacrud>
4876         </class>
4877         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4878                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4879                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4880                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4881                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4882                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4883                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4884                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4885                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4886                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4887                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4888                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4889                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4890                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4891                 </fields>
4892                 <links>
4893                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4894                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4895                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4896                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4897                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4898                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4899                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4900                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4901                 </links>
4902         </class>
4903         <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">
4904                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4905                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4906                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4907                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4908                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4909                 </fields>
4910                 <links>
4911                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4912                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4913                 </links>
4914         </class>
4915         <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">
4916                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4917                         <field name="bucket" reporter:datatype="link"/>
4918                         <field name="id" reporter:datatype="id" />
4919                         <field name="target_user" reporter:datatype="link"/>
4920                         <field name="create_time" reporter:datatype="timestamp" />
4921                         <field name="pos" reporter:datatype="int" />
4922                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4923                 </fields>
4924                 <links>
4925                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4926                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4927             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4928                 </links>
4929         </class>
4930         <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">
4931                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4932                         <field name="id" reporter:datatype="id" />
4933                         <field name="item" reporter:datatype="link"/>
4934                         <field name="note" reporter:datatype="text" />
4935                 </fields>
4936                 <links>
4937                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4938                 </links>
4939         </class>
4940         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4941                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4942                         <field name="balance_owed" reporter:datatype="money" />
4943                         <field name="total_owed" reporter:datatype="money" />
4944                         <field name="total_paid" reporter:datatype="money" />
4945                         <field name="usr" reporter:datatype="link"/>
4946                 </fields>
4947                 <links>
4948                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4949                 </links>
4950         </class>
4951         <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">
4952                 <fields oils_persist:primary="code" oils_persist:sequence="">
4953                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4954                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4955                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4956                 </fields>
4957                 <links/>
4958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4959             <actions>
4960                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4961                 <retrieve/>
4962                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4963                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4964             </actions>
4965         </permacrud>
4966         </class>
4967         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4968                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4969                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4970                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4971                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4972                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4973                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4974                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4975                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4976                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4977                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4978                 </fields>
4979                 <links>
4980                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4981                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4982                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4983                 </links>
4984         </class>
4985         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4986                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4987                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4988                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4989                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4990                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4991                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4992                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4993                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4994                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4995                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4996                 </fields>
4997                 <links>
4998                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4999                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5000                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5001                 </links>
5002         </class>
5003         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5004                 <fields oils_persist:primary="id" oils_persist:sequence="">
5005                         <field name="checkin_lib" reporter:datatype="link"/>
5006                         <field name="checkin_staff" reporter:datatype="link"/>
5007                         <field name="checkin_time" reporter:datatype="timestamp"/>
5008                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5009                         <field name="circ_staff" reporter:datatype="link"/>
5010                         <field name="desk_renewal" reporter:datatype="bool"/>
5011                         <field name="due_date" reporter:datatype="timestamp"/>
5012                         <field name="duration" reporter:datatype="interval"/>
5013                         <field name="duration_rule" reporter:datatype="link"/>
5014                         <field name="fine_interval" reporter:datatype="interval"/>
5015                         <field name="id" reporter:datatype="id" />
5016                         <field name="max_fine" reporter:datatype="money" />
5017                         <field name="max_fine_rule" reporter:datatype="link"/>
5018                         <field name="opac_renewal" reporter:datatype="bool"/>
5019                         <field name="phone_renewal" reporter:datatype="bool"/>
5020                         <field name="recurring_fine" reporter:datatype="money" />
5021                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5022                         <field name="renewal_remaining" reporter:datatype="int" />
5023             <field name="grace_period" reporter:datatype="interval" />
5024                         <field name="stop_fines" reporter:datatype="text"/>
5025                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5026                         <field name="target_copy" reporter:datatype="link"/>
5027                         <field name="usr" reporter:datatype="link"/>
5028                         <field name="xact_finish" reporter:datatype="timestamp" />
5029                         <field name="xact_start" reporter:datatype="timestamp" />
5030                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5031                 </fields>
5032                 <links>
5033                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5034                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5035                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5036                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5037                 </links>
5038         </class>
5039         <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">
5040                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5041                         <field name="field" reporter:datatype="link"/>
5042                         <field name="id" reporter:datatype="id" />
5043                         <field name="source" reporter:datatype="link"/>
5044                         <field name="value" reporter:datatype="text"/>
5045                 </fields>
5046                 <links>
5047                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5048                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5049                 </links>
5050         </class>
5051         <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">
5052                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5053                         <field name="high" reporter:datatype="money" />
5054                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5055                         <field name="low" reporter:datatype="money" />
5056                         <field name="name" reporter:datatype="text"/>
5057                         <field name="normal" reporter:datatype="money" />
5058                         <field name="recurrence_interval" reporter:datatype="interval"/>
5059             <field name="grace_period" reporter:datatype="interval" />
5060                 </fields>
5061                 <links/>
5062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5063             <actions>
5064                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5065                 <retrieve/>
5066                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5067                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5068             </actions>
5069         </permacrud>
5070         </class>
5071         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5072                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5073                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5074                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5075                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5076                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5077                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5078                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5079                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5080                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5081                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5082                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5083                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5084                 </fields>
5085                 <links>
5086                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5087                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5088                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5089                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5090                 </links>
5091         </class>
5092         <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">
5093                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5094                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5095                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5096                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5097                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5098                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5099                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5100                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5101                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5102                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5103                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5104                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5105                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5106                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5107                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5108                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5109                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5110                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5111                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5112                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5113                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5114                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5115                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5116                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5117                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5118                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5119                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5120                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5121                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5122                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5123                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5124                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5125                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5126                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5127                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5128                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5129                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5130                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5131                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5132                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5133                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5134                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5135                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5136                 </fields>
5137                 <links>
5138                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5139                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5140                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5141                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5142                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5143                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5144                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5145                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5146                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5147                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5148                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5149                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5150                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5151                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5152                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5153                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5154                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5155                 </links>
5156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5157             <actions>
5158                 <create permission="CREATE_COPY">
5159                     <context link="call_number" field="owning_lib"/>
5160                 </create>
5161                 <retrieve/>
5162                 <update permission="UPDATE_COPY">
5163                     <context link="call_number" field="owning_lib"/>
5164                 </update>
5165                 <delete permission="DELETE_COPY">
5166                     <context link="call_number" field="owning_lib"/>
5167                 </delete>
5168             </actions>
5169         </permacrud>
5170         </class>
5171
5172         <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">
5173                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5174                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5175                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5176                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5177                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5178                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5181                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5182                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5183                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5184                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5185                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5186                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5187                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5188                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5189                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5190                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5191                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5192                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5193                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5194                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5195                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5196                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5197                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5198                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5199                 </fields>
5200                 <links>
5201                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5202                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5203                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5204                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5205                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5206                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5207                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5208                 </links>
5209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5210                         <actions>
5211                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5212                                 <retrieve />
5213                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5214                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5215                         </actions>
5216                 </permacrud>
5217         </class>
5218
5219         <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">
5220                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5221                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5222                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5223                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5224                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5225                 </fields>
5226                 <links/>
5227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5228             <actions>
5229                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5230                 <retrieve/>
5231                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5232                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5233             </actions>
5234         </permacrud>
5235         </class>
5236         <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">
5237                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5238                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5239                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5240                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5241                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5242                 </fields>
5243                 <links/>
5244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5245             <actions>
5246                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5247                 <retrieve/>
5248                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5249                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5250             </actions>
5251         </permacrud>
5252         </class>
5253         <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">
5254                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5255                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5256                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5257                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5258                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5259                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5260                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5261                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5262                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5263                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5264                 </fields>
5265                 <links>
5266                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5267                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5268                 </links>
5269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5270             <actions>
5271                 <create permission="CREATE_PERM" global_required="true"/>
5272                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5273                 <update permission="UPDATE_PERM" global_required="true"/>
5274                 <delete permission="DELETE_PERM" global_required="true"/>
5275             </actions>
5276         </permacrud>
5277         </class>
5278         <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">
5279                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5280                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5281                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5282                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5283                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5284                 </fields>
5285                 <links>
5286                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5287                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5288                 </links>
5289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5290             <actions>
5291                 <create permission="ADMIN_SURVEY">
5292                     <context link="question" jump="survey" field="owner"/>
5293                 </create>
5294                 <retrieve/>
5295                 <update permission="ADMIN_SURVEY">
5296                     <context link="question" jump="survey" field="owner"/>
5297                 </update>
5298                 <delete permission="ADMIN_SURVEY">
5299                     <context link="question" jump="survey" field="owner"/>
5300                 </delete>
5301             </actions>
5302         </permacrud>
5303         </class>
5304         <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">
5305                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5306                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5307                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5308                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5309                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5310                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5311                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5312                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5313                 </fields>
5314                 <links>
5315                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5316                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5317                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5318                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5319                 </links>
5320         </class>
5321         <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">
5322                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5323                         <field name="balance_owed" reporter:datatype="money" />
5324                         <field name="total_owed" reporter:datatype="money" />
5325                         <field name="total_paid" reporter:datatype="money" />
5326                         <field name="usr" reporter:datatype="link"/>
5327                 </fields>
5328                 <links>
5329                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5330                 </links>
5331         </class>
5332         <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">
5333                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5334                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5335                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5336                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5337                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5338                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5339                 </fields>
5340                 <links>
5341                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5342                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5343                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5344                 </links>
5345         </class>
5346         <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">
5347                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5348                         <field name="field" reporter:datatype="link"/>
5349                         <field name="id" reporter:datatype="id" />
5350                         <field name="source" reporter:datatype="link"/>
5351                         <field name="value" reporter:datatype="text"/>
5352                 </fields>
5353                 <links>
5354                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5355                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5356                 </links>
5357         </class>
5358         <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">
5359                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5360                         <field name="field" reporter:datatype="link"/>
5361                         <field name="id" reporter:datatype="id" />
5362                         <field name="source" reporter:datatype="link"/>
5363                         <field name="value" reporter:datatype="text"/>
5364                 </fields>
5365                 <links>
5366                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5367                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5368                 </links>
5369         </class>
5370         <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">
5371                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5372                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5373                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5374                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5375                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5376                 </fields>
5377                 <links>
5378                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5379                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5380                 </links>
5381         </class>
5382         <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">
5383                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5384                         <field name="depth" reporter:datatype="int" />
5385                         <field name="grantable" reporter:datatype="bool"/>
5386                         <field name="grp" reporter:datatype="link"/>
5387                         <field name="id" reporter:datatype="id" />
5388                         <field name="perm" reporter:datatype="link"/>
5389                 </fields>
5390                 <links>
5391                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5392                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5393                 </links>
5394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5395             <actions>
5396                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5397                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5398                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5399                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5400             </actions>
5401         </permacrud>
5402         </class>
5403         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5404                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5405                         <field name="items" oils_persist:virtual="true" />
5406                         <field name="btype" reporter:datatype="text"/>
5407                         <field name="id" reporter:datatype="id" />
5408                         <field name="name" reporter:datatype="text"/>
5409                         <field name="description" reporter:datatype="text"/>
5410                         <field name="owner" reporter:datatype="link"/>
5411                         <field name="pub" reporter:datatype="bool"/>
5412                         <field name="create_time" reporter:datatype="timestamp" />
5413                 </fields>
5414                 <links>
5415                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5416                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5417                 </links>
5418         </class>
5419         <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">
5420                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5421                         <field name="id" reporter:datatype="id" />
5422                         <field name="bucket" reporter:datatype="link"/>
5423                         <field name="note" reporter:datatype="text" />
5424                 </fields>
5425                 <links>
5426                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5427                 </links>
5428         </class>
5429         <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">
5430                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5431                         <field name="id" reporter:datatype="int" />
5432                         <field name="usr" reporter:datatype="link"/>
5433                         <field name="work_ou" reporter:datatype="link"/>
5434                 </fields>
5435                 <links>
5436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5437                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5438                 </links>
5439         </class>
5440         <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">
5441                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5442                         <field name="depth" reporter:datatype="int"/>
5443                         <field name="grantable" reporter:datatype="bool"/>
5444                         <field name="id" reporter:datatype="id" />
5445                         <field name="perm" reporter:datatype="link"/>
5446                         <field name="usr" reporter:datatype="link"/>
5447                 </fields>
5448                 <links>
5449                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5450                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5451                 </links>
5452         </class>
5453         <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">
5454                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5455                         <field name="object_id" reporter:datatype="text"/>
5456                         <field name="grantable" reporter:datatype="bool"/>
5457                         <field name="id" reporter:datatype="id" />
5458                         <field name="perm" reporter:datatype="link"/>
5459                         <field name="usr" reporter:datatype="link"/>
5460                         <field name="object_type" reporter:datatype="text"/>
5461                 </fields>
5462                 <links>
5463                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5464                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5465                 </links>
5466         </class>
5467         <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">
5468                 <fields oils_persist:primary="id" oils_persist:sequence="">
5469                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5470                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5471                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5472                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5473                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5474                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5475                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5476                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5477                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5478                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5479                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5480                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5481                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5482                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5483                 </fields>
5484                 <links>
5485                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5486                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5487                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5488                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5489                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5490                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5491                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5492                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5493                 </links>
5494         </class>
5495         <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">
5496                 <fields oils_persist:primary="id" oils_persist:sequence="">
5497                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5498                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5499                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5500                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5501                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5502                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5503                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5504                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5505                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5506                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5507                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5508                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5509                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5510                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5511                 </fields>
5512                 <links>
5513                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5514                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5515                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5516                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5517                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5518                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5519                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5520                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5521                 </links>
5522         </class>
5523         <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">
5524                 <fields oils_persist:primary="id" oils_persist:sequence="">
5525                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5526                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5527                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5528                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5530                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5531                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5532                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5533                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5535                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5536                 </fields>
5537                 <links>
5538                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5539                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5540                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5541                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5542                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5543                 </links>
5544         </class>
5545         <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">
5546                 <fields oils_persist:primary="id" oils_persist:sequence="">
5547                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5548                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5549                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5550                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5551                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5552                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5553                         <field reporter:label="Accepting User" name="accepting_usr" />
5554                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5555                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5556                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5557                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5558                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5559                 </fields>
5560                 <links>
5561                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5562                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5563                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5564                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5565                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5566                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5567                 </links>
5568         </class>
5569         <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">
5570                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5571                         <field name="bucket" reporter:datatype="link"/>
5572                         <field name="id" reporter:datatype="id" />
5573                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5574                         <field name="create_time" reporter:datatype="timestamp" />
5575                         <field name="pos" reporter:datatype="int" />
5576                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5577                 </fields>
5578                 <links>
5579                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5580                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5581             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5582                 </links>
5583         </class>
5584         <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">
5585                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5586                         <field name="id" reporter:datatype="id" />
5587                         <field name="item" reporter:datatype="link"/>
5588                         <field name="note" reporter:datatype="text" />
5589                 </fields>
5590                 <links>
5591                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5592                 </links>
5593         </class>
5594         <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">
5595                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5596                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5597                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5598                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5599                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5600                 </fields>
5601                 <links>
5602                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5603                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5604                 </links>
5605         </class>
5606     <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">
5607         <fields oils_persist:primary="field">
5608             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5609             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5610             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5611         </fields>
5612         <links/>
5613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5614             <actions>
5615                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5616                 <retrieve />
5617                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5618                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5619             </actions>
5620         </permacrud>
5621     </class>
5622         <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">
5623                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5624                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5625                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5626                 </fields>
5627                 <links/>
5628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5629             <actions>
5630                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5631                 <retrieve/>
5632                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5633                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5634             </actions>
5635         </permacrud>
5636         </class>
5637
5638
5639         <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">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5641                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5642                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5643                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5644                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5645                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5646                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5647                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5648                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5649                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5650                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5651                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5652                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5653                 </fields>
5654                 <links>
5655                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5656                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5657                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5658                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5659                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5660                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5661                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5662                 </links>
5663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5664             <actions>
5665                 <create permission="TRANSIT_COPY">
5666                     <context link="target_copy" field="owner"/>
5667                 </create>
5668                 <retrieve/>
5669                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5670                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5671             </actions>
5672         </permacrud>
5673         </class>
5674         <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">
5675                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5676                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5677                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5678                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5679                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5680                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5681                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5682                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5683                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5684                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5685                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5686                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5687                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5688                 </fields>
5689                 <links>
5690                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5691                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5692                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5693                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5694                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5695                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5696                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5697                 </links>
5698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5699             <actions>
5700                 <create permission="TRANSIT_COPY" context_field="owner">
5701                     <context link="target_copy" field="circ_lib"/>
5702                 </create>
5703                 <retrieve/>
5704                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5705                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5706             </actions>
5707         </permacrud>
5708         </class>
5709         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5710                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5711                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5712                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5713                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5714                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5715                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5716                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5717                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5718                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5719                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5720                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5721                 </fields>
5722                 <links>
5723                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5724                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5725                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5726                 </links>
5727         </class>
5728         <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">
5729                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5730                         <field name="grp" />
5731                         <field name="id" reporter:datatype="id" />
5732                         <field name="usr" />
5733                 </fields>
5734                 <links>
5735                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5736                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5737                 </links>
5738         </class>
5739         <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">
5740                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5741                         <field name="id" reporter:datatype="id" />
5742                         <field name="fq_field" reporter:datatype="text"/>
5743                         <field name="identity_value" reporter:datatype="text"/>
5744                         <field name="translation" reporter:datatype="text"/>
5745                         <field name="string" reporter:datatype="text"/>
5746                 </fields>
5747                 <links>
5748                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5749                 </links>
5750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5751             <actions>
5752                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5753                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5754                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5755                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5756             </actions>
5757         </permacrud>
5758         </class>
5759         <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">
5760                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5761                         <field name="id" reporter:datatype="id" />
5762                         <field name="fm_class" reporter:datatype="text"/>
5763                         <field name="field" reporter:datatype="text"/>
5764                         <field name="owner" reporter:datatype="org_unit"/>
5765                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5766                 </fields>
5767                 <links>
5768                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5769                 </links>
5770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5771             <actions>
5772                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5773                 <retrieve/>
5774                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5775                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5776             </actions>
5777         </permacrud>
5778         </class>
5779         <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">
5780                 <fields oils_persist:primary="code">
5781                         <field name="code" reporter:datatype="id" />
5782                         <field name="marc_code" reporter:datatype="text"/>
5783                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5784                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5785                 </fields>
5786                 <links/>
5787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5788             <actions>
5789                 <create permission="CREATE_LOCALE" global_required="true"/>
5790                 <retrieve/>
5791                 <update permission="UPDATE_LOCALE" global_required="true"/>
5792                 <delete permission="DELETE_LOCALE" global_required="true"/>
5793             </actions>
5794         </permacrud>
5795         </class>
5796         <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">
5797                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5798                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5799                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5800                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5801             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5802                 </fields>
5803                 <links>
5804                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5805                 </links>
5806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5807             <actions>
5808                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5809                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5810                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5811                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5812             </actions>
5813         </permacrud>
5814         </class>
5815
5816         <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">
5817                 <fields oils_persist:primary="id">
5818                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5819                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5820                 </fields>
5821                 <links/>
5822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5823             <actions>
5824                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5825                 <retrieve/>
5826                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5827                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5828             </actions>
5829         </permacrud>
5830         </class>
5831
5832         <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">
5833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5834                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5835                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5836                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
5837                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5838                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5839                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5840                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5841                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5842                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5843                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5844                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5845                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5846                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5847                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5848                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5849                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5850                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5851                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5852                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5853                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5854                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5855                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5856                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5857                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5858                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5859                 </fields>
5860                 <links>
5861                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5862                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5863                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5864                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5865                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5866                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5867                 </links>
5868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5869             <actions>
5870                 <create permission="user_request.create">
5871                     <context link="usr" field="home_ou"/>
5872                                 </create>
5873                 <retrieve permission="user_request.view">
5874                     <context link="usr" field="home_ou"/>
5875                                 </retrieve>
5876                 <update permission="user_request.update">
5877                     <context link="usr" field="home_ou"/>
5878                                 </update>
5879                 <delete permission="user_request.delete">
5880                     <context link="usr" field="home_ou"/>
5881                                 </delete>
5882             </actions>
5883         </permacrud>
5884         </class>
5885
5886         <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">
5887                 <fields oils_persist:primary="code">
5888                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5889                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5890                 </fields>
5891                 <links/>
5892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5893             <actions>
5894                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5895                 <retrieve/>
5896                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5897                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5898             </actions>
5899         </permacrud>
5900         </class>
5901
5902         <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">
5903                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5904                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5905                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5906                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5907                         <field reporter:label="Ratio" name="ratio" />
5908                 </fields>
5909                 <links>
5910                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5911                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5912                 </links>
5913                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5914                         <actions>
5915                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5916                                 <retrieve/>
5917                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5918                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5919                         </actions>
5920                 </permacrud>
5921         </class>
5922
5923         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5925                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5926                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5927                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5928                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5929                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5930                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5931                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5932                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5933                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5934                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5935                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5936                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5937                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5938                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5939                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5940                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5941                 </fields>
5942                 <links>
5943                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5944                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5945             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5946             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5947             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5948                 </links>
5949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5950             <actions>
5951                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5952                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5953                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5954                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5955             </actions>
5956         </permacrud>
5957         </class>
5958
5959         <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">
5960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5961                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5962                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5963                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5964                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5965                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5966                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5967                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5968                 </fields>
5969                 <links>
5970                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5971                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5972                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5973                 </links>
5974         </class>
5975
5976         <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">
5977                 <fields oils_persist:primary="code">
5978                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5979                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5980                 </fields>
5981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5982             <actions>
5983                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5984                 <retrieve/>
5985                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5986                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5987             </actions>
5988                 </permacrud>
5989         </class>
5990
5991         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5993                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5994                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5995                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5996                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5997                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5998                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5999                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6000                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6001                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6002                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6003                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6004                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6005                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6006                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6007                 </fields>
6008                 <links>
6009                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6010                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6011                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6012                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6013                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6014                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6015                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6016                 </links>
6017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6018             <actions>
6019                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6020                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6021                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6022                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6023             </actions>
6024         </permacrud>
6025         </class>
6026
6027         <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">
6028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6029                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6030                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6031                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6032                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6033                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6034                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6035                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6036                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6037                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6038                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6039                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6040                 </fields>
6041                 <links>
6042                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6043                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6044                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6045                 </links>
6046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6047             <actions>
6048                 <create   permission="ADMIN_INVOICE">
6049                                         <context link="invoice" field="receiver"/>
6050                                 </create>
6051                 <retrieve permission="ADMIN_INVOICE">
6052                                         <context link="invoice" field="receiver"/>
6053                                 </retrieve>
6054                 <update   permission="ADMIN_INVOICE">
6055                                         <context link="invoice" field="receiver"/>
6056                                 </update>
6057                                 <delete   permission="ADMIN_INVOICE">
6058                                         <context link="invoice" field="receiver"/>
6059                                 </delete>
6060             </actions>
6061         </permacrud>
6062         </class>
6063
6064         <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">
6065                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6066                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6067                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6068                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6069                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6070                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6071                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6072                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6073                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6074                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6075                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6076                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6077                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6078                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6079                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6080                 </fields>
6081                 <links>
6082                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6083                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6084                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6085                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6086                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6087                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6088                 </links>
6089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6090             <actions>
6091                 <create   permission="ADMIN_INVOICE">
6092                                         <context link="invoice" field="receiver"/>
6093                                 </create>
6094                 <retrieve permission="ADMIN_INVOICE">
6095                                         <context link="invoice" field="receiver"/>
6096                                 </retrieve>
6097                 <update   permission="ADMIN_INVOICE">
6098                                         <context link="invoice" field="receiver"/>
6099                                 </update>
6100                                 <delete   permission="ADMIN_INVOICE">
6101                                         <context link="invoice" field="receiver"/>
6102                                 </delete>
6103             </actions>
6104         </permacrud>
6105         </class>
6106
6107         <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">
6108                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6109                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6110                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6111                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6112                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6113                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6114                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6115                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6116                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6117                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6118                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6119                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6120                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6121                 </fields>
6122                 <links>
6123                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6124                 </links>
6125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6126             <actions>
6127                 <create permission="ADMIN_PROVIDER">
6128                     <context link="provider" field="owner"/>
6129                 </create>
6130                 <retrieve permission="ADMIN_PROVIDER">
6131                     <context link="provider" field="owner"/>
6132                 </retrieve>
6133                 <update permission="ADMIN_PROVIDER">
6134                     <context link="provider" field="owner"/>
6135                 </update>
6136                 <delete permission="ADMIN_PROVIDER">
6137                     <context link="provider" field="owner"/>
6138                 </delete>
6139             </actions>
6140         </permacrud>
6141         </class>
6142
6143         <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">
6144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6145                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6146                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6147                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6148                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6149                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6150                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6151         </fields>
6152                 <links>
6153                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6154                 </links>
6155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6156             <actions>
6157                 <create permission="ADMIN_PROVIDER">
6158                     <context link="provider" field="owner"/>
6159                 </create>
6160                 <retrieve permission="ADMIN_PROVIDER">
6161                     <context link="provider" field="owner"/>
6162                 </retrieve>
6163                 <update permission="ADMIN_PROVIDER">
6164                     <context link="provider" field="owner"/>
6165                 </update>
6166                 <delete permission="ADMIN_PROVIDER">
6167                     <context link="provider" field="owner"/>
6168                 </delete>
6169             </actions>
6170         </permacrud>
6171     </class>
6172         <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">
6173                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6174                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6175                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6176                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6177                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6178                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6179                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6180                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6181                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6182                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6183                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6184                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6185                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6186                 </fields>
6187                 <links>
6188                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6189                 </links>
6190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6191             <actions>
6192                 <create permission="ADMIN_PROVIDER">
6193                     <context link="contact" jump='provider' field="owner"/>
6194                 </create>
6195                 <retrieve permission="ADMIN_PROVIDER">
6196                     <context link="contact" jump='provider' field="owner"/>
6197                 </retrieve>
6198                 <update permission="ADMIN_PROVIDER">
6199                     <context link="contact" jump='provider' field="owner"/>
6200                 </update>
6201                 <delete permission="ADMIN_PROVIDER">
6202                     <context link="contact" jump='provider' field="owner"/>
6203                 </delete>
6204             </actions>
6205         </permacrud>
6206         </class>
6207
6208         <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">
6209                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6210                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6211                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6212                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6213                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6214                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6215                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6216                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6217                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6218                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6219                 </fields>
6220                 <links>
6221                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6222                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6223                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6224                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6225                 </links>
6226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6227                 </permacrud>
6228         </class>
6229
6230         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6231                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6232                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6233                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6234                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6235                 </fields>
6236                 <links>
6237             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6238                 </links>
6239                 <!--
6240                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6241                         But here's what it should look like if we ever do use pcrud.
6242                 -->
6243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6244                         <actions>
6245                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6246                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6247                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6248                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6249                         </actions>
6250                 </permacrud>
6251         </class>
6252
6253         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6254                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6255                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6256                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6257                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6258                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6259                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6260                 </fields>
6261                 <links>
6262                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6263                 </links>
6264                 <!--
6265                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6266                         But here's what it should look like if we ever do use pcrud.
6267                 -->
6268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6269                         <actions>
6270                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6271                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6272                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6273                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6274                         </actions>
6275                 </permacrud>
6276         </class>
6277
6278         <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">
6279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6280                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6281                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6282                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6283                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6284                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6285                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6286                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6287                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6288                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6289                 </fields>
6290                 <links>
6291                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6292                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6293             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6294             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6295                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6296                 </links>
6297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6298             <actions>
6299                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6300                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6301                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6302                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6303             </actions>
6304         </permacrud>
6305         </class>
6306
6307         <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">
6308                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6309                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6310                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6311                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6312                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6313                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6314                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6315                 </fields>
6316                 <links>
6317                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6318                 </links>
6319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6320                         <actions>
6321                                 <create permission="ADMIN_FUNDING_SOURCE">
6322                     <context link="funding_source" field="owner"/>
6323                 </create>
6324                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6325                     <context link="funding_source" field="owner"/>
6326                 </retrieve>
6327                                 <update permission="ADMIN_FUNDING_SOURCE">
6328                     <context link="funding_source" field="owner"/>
6329                 </update>
6330                                 <delete permission="ADMIN_FUNDING_SOURCE">
6331                     <context link="funding_source" field="owner"/>
6332                 </delete>
6333                         </actions>
6334                 </permacrud>
6335         </class>
6336
6337         <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">
6338                 <fields oils_persist:primary="id">
6339                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6340                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6341                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6342                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6343                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6344                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6345                 </fields>
6346                 <links>
6347                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6348                 </links>
6349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6350                 </permacrud>
6351         </class>
6352
6353         <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">
6354                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6355                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6356                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6357                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6358                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6359                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6360                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6361                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6362                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6363                 </fields>
6364                 <links>
6365                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6366                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6367                 </links>
6368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6369                         <actions>
6370                                 <create permission="ADMIN_ACQ_FUND">
6371                     <context link="fund" field="org"/>
6372                 </create>
6373                                 <retrieve permission="ADMIN_ACQ_FUND">
6374                     <context link="fund" field="org"/>
6375                 </retrieve>
6376                                 <update permission="ADMIN_ACQ_FUND">
6377                     <context link="fund" field="org"/>
6378                 </update>
6379                                 <delete permission="ADMIN_ACQ_FUND">
6380                     <context link="fund" field="org"/>
6381                 </delete>
6382                         </actions>
6383                 </permacrud>
6384         </class>
6385
6386         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6387                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6388                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6389                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6390                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6391                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6392                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6393                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6394                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6395                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6396                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6397                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6398                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6399                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6400                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6401                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6402                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6403                 </fields>
6404                 <links>
6405                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6406                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6407             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6408             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6409             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6410                 </links>
6411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6412             <actions>
6413                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6414                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6415                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6416                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6417             </actions>
6418         </permacrud>
6419         </class>
6420
6421         <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">
6422                 <fields oils_persist:primary="fund">
6423                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6424                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6425                 </fields>
6426                 <links>
6427                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6428                 </links>
6429         </class>
6430
6431         <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">
6432                 <fields oils_persist:primary="fund">
6433                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6434                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6435                 </fields>
6436                 <links>
6437                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6438                 </links>
6439         </class>
6440
6441         <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">
6442                 <fields oils_persist:primary="fund">
6443                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6444                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6445                 </fields>
6446                 <links>
6447                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6448                 </links>
6449         </class>
6450
6451         <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">
6452                 <fields oils_persist:primary="fund">
6453                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6454                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6455                 </fields>
6456                 <links>
6457                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6458                 </links>
6459         </class>
6460
6461         <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">
6462                 <fields oils_persist:primary="fund">
6463                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6464                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6465                 </fields>
6466                 <links>
6467                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6468                 </links>
6469         </class>
6470
6471    <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">
6472         <fields oils_persist:primary="fund">
6473             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6474             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6475         </fields>
6476         <links>
6477             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6478         </links>
6479     </class>
6480
6481    <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">
6482         <fields oils_persist:primary="fund">
6483             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6484             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6485         </fields>
6486         <links>
6487             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6488         </links>
6489     </class>
6490
6491    <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">
6492         <fields oils_persist:primary="fund">
6493             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6494             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6495         </fields>
6496         <links>
6497             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6498         </links>
6499     </class>
6500
6501    <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">
6502         <fields oils_persist:primary="fund">
6503             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6504             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6505         </fields>
6506         <links>
6507             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6508         </links>
6509     </class>
6510
6511    <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">
6512         <fields oils_persist:primary="fund">
6513             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6514             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6515         </fields>
6516         <links>
6517             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6518         </links>
6519     </class>
6520
6521         <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">
6522                 <fields oils_persist:primary="funding_source">
6523                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6524                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6525                 </fields>
6526                 <links>
6527                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6528                 </links>
6529         </class>
6530
6531         <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">
6532                 <fields oils_persist:primary="funding_source">
6533                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6534                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6535                 </fields>
6536                 <links>
6537                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6538                 </links>
6539         </class>
6540
6541         <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">
6542                 <fields oils_persist:primary="funding_source">
6543                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6544                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6545                 </fields>
6546                 <links>
6547                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6548                 </links>
6549         </class>
6550
6551         <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">
6552                 <fields oils_persist:primary="fund">
6553                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6554                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6555                 </fields>
6556                 <links>
6557                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6558                 </links>
6559         </class>
6560
6561         <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">
6562                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6563                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6564                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6565                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6566                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6567                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6568                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6569                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6570                 </fields>
6571                 <links>
6572                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6573                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6574                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6575                 </links>
6576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6577                         <actions>
6578                                 <create permission="ADMIN_ACQ_FUND">
6579                     <context link="fund" field="org"/>
6580                 </create>
6581                                 <retrieve permission="ADMIN_ACQ_FUND">
6582                     <context link="fund" field="org"/>
6583                 </retrieve>
6584                                 <update permission="ADMIN_ACQ_FUND">
6585                     <context link="fund" field="org"/>
6586                 </update>
6587                                 <delete permission="ADMIN_ACQ_FUND">
6588                     <context link="fund" field="org"/>
6589                 </delete>
6590                         </actions>
6591                 </permacrud>
6592         </class>
6593
6594     <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">
6595         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6596             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6597             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6598             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6599             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6600             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6601             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6602             <field reporter:label="Note" name="note" reporter:datatype="text" />
6603             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6604         </fields>
6605         <links>
6606             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6607             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6608             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6609         </links>
6610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6611                         <actions>
6612                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6613                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6614                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6615                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6616                         </actions>
6617                 </permacrud>
6618     </class>
6619
6620         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6622                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6623                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6624                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6625                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6626                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6627                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6628                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6629                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6630                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6631                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6632                 </fields>
6633                 <links>
6634                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6635                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6636                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6637                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6638                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6639                 </links>
6640                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6641                         <actions>
6642                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6643                         </actions>
6644                 </permacrud>
6645         </class>
6646
6647         <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">
6648                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6649                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6650                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6651                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6652                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6653                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6654                 </fields>
6655                 <links>
6656                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6657                 </links>
6658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6659                         <actions>
6660                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6661                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6662                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6663                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6664                         </actions>
6665                 </permacrud>
6666         </class>
6667
6668         <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">
6669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6670                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6671                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6672                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6673                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6674                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6675                         <field reporter:label="State" name="state" reporter:datatype="text" />
6676                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6677                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6678                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6679                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6680                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6681                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6682                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6683                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6684                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6685                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6686                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6687                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6688                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6689                 </fields>
6690                 <links>
6691                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6692                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6693                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6694                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6695                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6696                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6697                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6698                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6699                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6700                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6701                 </links>
6702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6703                         <actions>
6704                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6705                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6706                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6707                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6708                         </actions>
6709                 </permacrud>
6710         </class>
6711
6712         <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">
6713                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6714                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6715                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6716                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6717                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6718                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6719                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6720                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6721                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6722                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6723                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6724                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6725                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6726                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6727                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6728                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6729                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6730                 </fields>
6731                 <links>
6732                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6733                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6734                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6735                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6736                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6737                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6738                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6739                 </links>
6740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6741             <actions>
6742                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6743             </actions>
6744                 </permacrud>
6745         </class>
6746
6747         <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">
6748                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6749                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6750                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6751                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6752                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6753                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6754                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6755                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6756                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6757                 </fields>
6758                 <links>
6759                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6760                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6761                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6762                 </links>
6763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6764             <actions>
6765                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6766                     <context link="purchase_order" field="ordering_agency"/>
6767                 </retrieve>
6768                 <create permission="CREATE_PURCHASE_ORDER">
6769                     <context link="purchase_order" field="ordering_agency"/>
6770                 </create>
6771                 <update permission="CREATE_PURCHASE_ORDER">
6772                     <context link="purchase_order" field="ordering_agency"/>
6773                 </update>
6774                 <delete permission="CREATE_PURCHASE_ORDER">
6775                     <context link="purchase_order" field="ordering_agency"/>
6776                 </delete>
6777             </actions>
6778                 </permacrud>
6779         </class>
6780
6781         <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">
6782                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6783                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6784                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6785                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6786                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6787                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6788                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6789                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6790                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6791                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6792                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6793                 </fields>
6794                 <links>
6795                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6796                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6797                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6798                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6799                 </links>
6800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6801             <actions>
6802                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6803                     <context link="purchase_order" field="ordering_agency"/>
6804                 </retrieve>
6805                 <create permission="CREATE_PURCHASE_ORDER">
6806                     <context link="purchase_order" field="ordering_agency"/>
6807                 </create>
6808                 <update permission="CREATE_PURCHASE_ORDER">
6809                     <context link="purchase_order" field="ordering_agency"/>
6810                 </update>
6811                 <delete permission="CREATE_PURCHASE_ORDER">
6812                     <context link="purchase_order" field="ordering_agency"/>
6813                 </delete>
6814             </actions>
6815                 </permacrud>
6816         </class>
6817
6818         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6819                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6820                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6821                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6822                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6823                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6824                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6825                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6826                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6827                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6828                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6829                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6830                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6831                         <field reporter:label="State" name="state" reporter:datatype="text" />
6832                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6833                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6834                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6835                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6836                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6837                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6838                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6839                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6840                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6841                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6842                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6843                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6844                 </fields>
6845                 <links>
6846                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6847                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6848                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6849                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6850                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6851                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6852                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6853                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6854                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6855                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6856                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6857                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6858                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6859                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6860                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6861                 </links>
6862                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6863                         <actions>
6864                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6865                                         <context link="purchase_order" field="ordering_agency"/>
6866                                         <context link="picklist" field="org_unit"/>
6867                                 </retrieve>
6868                         </actions>
6869                 </permacrud>
6870         </class>
6871
6872         <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">
6873                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6874                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6875                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6876                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6877                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6878                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6879                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6880                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6881                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6882                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6883                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6884                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6885                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6886                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6887                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6888                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6889                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6890                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6891                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6892                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6893                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6894                 </fields>
6895                 <links>
6896                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6898                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6899                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6900                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6901                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6902                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6903                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6904                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6905                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6906                 </links>
6907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6908                         <actions>
6909                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6910                                         <context link="purchase_order" field="ordering_agency"/>
6911                                         <context link="picklist" field="org_unit"/>
6912                                 </retrieve>
6913                         </actions>
6914                 </permacrud>
6915         </class>
6916
6917         <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">
6918                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6919                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6920                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6921                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6922                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6923                 </fields>
6924                 <links>
6925                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6926                 </links>
6927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6928                         <actions>
6929                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6930                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6931                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6932                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6933                         </actions>
6934                 </permacrud>
6935         </class>
6936
6937         <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">
6938                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6939                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6940                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6941                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6942                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6943                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6944                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6945                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6946                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6947                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6948                 </fields>
6949                 <links>
6950                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6951                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6952                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6953                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6954                 </links>
6955         </class>
6956
6957         <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">
6958                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6959                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6960                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6961                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6962                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6963                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6964                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6965                 </fields>
6966                 <links>
6967                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6968                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6969                 </links>
6970         </class>
6971
6972         <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">
6973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6974                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6975                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6976                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6977                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6978                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6979                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6980                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
6981                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6982                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6983                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6984                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6985                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6986                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6987                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6988                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6989                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6990                 </fields>
6991                 <links>
6992                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6993                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6994                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6995                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6996                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6997                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6998                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6999                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7000                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7001                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7002                 </links>
7003         </class>
7004
7005         <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">
7006                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7007                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7008                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7009                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7010                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7011                 </fields>
7012                 <links/>
7013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7014                         <actions>
7015                                 <retrieve />
7016                         </actions>
7017                 </permacrud>
7018         </class>
7019
7020         <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">
7021                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7022                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7023                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7024                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7025                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7026                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7027             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7028                 </fields>
7029                 <links/>
7030         <permacrud>
7031             <actions>
7032                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7033                 <retrieve />
7034                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7035                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7036             </actions>
7037         </permacrud>
7038         </class>
7039
7040         <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">
7041                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7042                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7043                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7044                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7045                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7046                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7047                 </fields>
7048                 <links/>
7049         </class>
7050         <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">
7051                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7052                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7053                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7054                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7055                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7056                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7057                 </fields>
7058                 <links>
7059                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7060                 </links>
7061         </class>
7062
7063         <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">
7064             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7065                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7066                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7067                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7068                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7069                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7070                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7071         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7072
7073             </fields>
7074             <links>
7075                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7076             </links>
7077             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7078                 <actions>
7079                     <create permission="ADMIN_PROVIDER">
7080                         <context link="provider" field="owner"/>
7081                     </create>
7082                     <retrieve permission="ADMIN_PROVIDER">
7083                         <context link="provider" field="owner"/>
7084                     </retrieve>
7085                     <update permission="ADMIN_PROVIDER">
7086                         <context link="provider" field="owner"/>
7087                     </update>
7088                     <delete permission="ADMIN_PROVIDER">
7089                         <context link="provider" field="owner"/>
7090                     </delete>
7091                 </actions>
7092             </permacrud>
7093         </class>
7094         
7095         <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">
7096             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7097                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7098                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7099                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7100                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7101             </fields>
7102             <links>
7103                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7104             </links>
7105             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7106                 <actions>
7107                     <create permission="ADMIN_PROVIDER">
7108                         <context link="provider" field="owner"/>
7109                     </create>
7110                     <retrieve permission="ADMIN_PROVIDER">
7111                         <context link="provider" field="owner"/>
7112                     </retrieve>
7113                     <update permission="ADMIN_PROVIDER">
7114                         <context link="provider" field="owner"/>
7115                     </update>
7116                     <delete permission="ADMIN_PROVIDER">
7117                         <context link="provider" field="owner"/>
7118                     </delete>
7119                 </actions>
7120             </permacrud>
7121         </class>
7122         
7123         <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">
7124             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7125                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7126                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7127                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7128                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7129                 </fields>
7130                 <links/>
7131         </class>
7132
7133         <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">
7134                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7135                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7136                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7137                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7138                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7139                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7140                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7141                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7142                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7143                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7144                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7145                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7146                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7147                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7148                 </fields>
7149                 <links>
7150                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7151                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7152                 </links>
7153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7154             <actions>
7155                 <create permission="ADMIN_PROVIDER">
7156                     <context link="provider" field="owner"/>
7157                 </create>
7158                 <retrieve permission="ADMIN_PROVIDER">
7159                     <context link="provider" field="owner"/>
7160                 </retrieve>
7161                 <update permission="ADMIN_PROVIDER">
7162                     <context link="provider" field="owner"/>
7163                 </update>
7164                 <delete permission="ADMIN_PROVIDER">
7165                     <context link="provider" field="owner"/>
7166                 </delete>
7167             </actions>
7168         </permacrud>
7169         </class>
7170
7171         <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">
7172                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7173                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7174                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7175                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7176                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7177                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7178                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7179                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7180                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7181                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7182                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7183                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7184                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7185                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7186                 </fields>
7187                 <links>
7188                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7189                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7190                 </links>
7191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7192             <actions>
7193                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7194                     <context link="account" jump="provider" field="owner"/>
7195                 </retrieve>
7196                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7197                     <context link="account" jump="provider" field="owner"/>
7198                 </update>
7199                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7200                     <context link="account" jump="provider" field="owner"/>
7201                 </delete>
7202             </actions>
7203         </permacrud>
7204         </class>
7205
7206
7207         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7208                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7209                         <field name="id" reporter:datatype="id" />
7210                         <field name="parent" reporter:datatype="link"/>
7211                         <field name="owner" reporter:datatype="link"/>
7212                         <field name="create_time" reporter:datatype="timestamp"/>
7213                         <field name="name" reporter:datatype="text"/>
7214                         <field name="shared" reporter:datatype="bool"/>
7215                         <field name="share_with" reporter:datatype="link"/>
7216                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7217                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7218                 </fields>
7219                 <links>
7220                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7221                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7222                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7223                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7224                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7225                 </links>
7226         </class>
7227         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7228                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7229                         <field name="id" reporter:datatype="id" />
7230                         <field name="parent" reporter:datatype="link"/>
7231                         <field name="owner" reporter:datatype="link"/>
7232                         <field name="create_time" reporter:datatype="timestamp"/>
7233                         <field name="name" reporter:datatype="text"/>
7234                         <field name="shared" reporter:datatype="bool"/>
7235                         <field name="share_with" reporter:datatype="link"/>
7236                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7237                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7238                 </fields>
7239                 <links>
7240                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7241                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7242                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7243                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7244                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7245                 </links>
7246         </class>
7247         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7248                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7249                         <field name="id" reporter:datatype="id" />
7250                         <field name="parent" reporter:datatype="link"/>
7251                         <field name="owner" reporter:datatype="link"/>
7252                         <field name="create_time" reporter:datatype="timestamp"/>
7253                         <field name="name" reporter:datatype="text"/>
7254                         <field name="shared" reporter:datatype="bool"/>
7255                         <field name="share_with" reporter:datatype="link"/>
7256                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7257                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7258                 </fields>
7259                 <links>
7260                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7261                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7262                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7263                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7264                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7265                 </links>
7266         </class>
7267         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7268                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7269                         <field name="id" reporter:datatype="id" />
7270                         <field name="owner" reporter:datatype="link"/>
7271                         <field name="create_time" reporter:datatype="timestamp"/>
7272                         <field name="name" reporter:datatype="text"/>
7273                         <field name="data" reporter:datatype="text"/>
7274                         <field name="folder" reporter:datatype="link"/>
7275                         <field name="description" reporter:datatype="text"/>
7276                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7277                 </fields>
7278                 <links>
7279                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7280                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7281                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7282                 </links>
7283         </class>
7284         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7286                         <field name="id" reporter:datatype="id" />
7287                         <field name="owner" reporter:datatype="link"/>
7288                         <field name="create_time" reporter:datatype="timestamp"/>
7289                         <field name="template" reporter:datatype="link"/>
7290                         <field name="data" reporter:datatype="text"/>
7291                         <field name="folder" reporter:datatype="link"/>
7292                         <field name="recur" reporter:datatype="bool"/>
7293                         <field name="recurrence" reporter:datatype="interval"/>
7294                         <field name="name" reporter:datatype="text"/>
7295                         <field name="description" reporter:datatype="text"/>
7296                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7297                 </fields>
7298                 <links>
7299                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7300                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7301                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7302                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7303                 </links>
7304         </class>
7305         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7306                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7307                         <field name="id" reporter:datatype="id" />
7308                         <field name="runner" reporter:datatype="link"/>
7309                         <field name="start_time" reporter:datatype="timestamp"/>
7310                         <field name="complete_time" reporter:datatype="timestamp"/>
7311                         <field name="run_time" reporter:datatype="timestamp"/>
7312                         <field name="email" reporter:datatype="text"/>
7313                         <field name="excel_format" reporter:datatype="bool"/>
7314                         <field name="csv_format" reporter:datatype="bool"/>
7315                         <field name="html_format" reporter:datatype="bool"/>
7316                         <field name="error_code" reporter:datatype="int"/>
7317                         <field name="error_text" reporter:datatype="text"/>
7318                         <field name="report" reporter:datatype="link"/>
7319                         <field name="folder" reporter:datatype="link"/>
7320                         <field name="chart_pie" reporter:datatype="bool"/>
7321                         <field name="chart_bar" reporter:datatype="bool"/>
7322                         <field name="chart_line" reporter:datatype="bool"/>
7323                 </fields>
7324                 <links>
7325                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7326                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7327                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7328                 </links>
7329         </class>
7330         <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">
7331                 <fields oils_persist:primary="id">
7332                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7333                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7334                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7335                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7336                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7337                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7338                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7339                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7340                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7341                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7342                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7343                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7344                 </fields>
7345                 <links>
7346                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7347                 </links>
7348         </class>
7349         <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">
7350                 <fields oils_persist:primary="id">
7351                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7352                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7353                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7354                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7355                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7356                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7357                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7358                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7359                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7360                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7361                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7362                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7363                 </fields>
7364                 <links>
7365                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7366                 </links>
7367         </class>
7368         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7369                 <fields oils_persist:primary="id">
7370                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7371                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7372                         <field reporter:label="Fingerprint" name="fingerprint" />
7373                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7374                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7375                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7376                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7377                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7378                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7379                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7380                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7381                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7382                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7383                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7384                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7385                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7386                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7387                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7388                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7389                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7390                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7391                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7392                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7393                 </fields>
7394                 <links>
7395                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7396                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7397                 </links>
7398         </class>
7399         <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">
7400                 <fields oils_persist:primary="id">
7401                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7402                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7403                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7404                 </fields>
7405                 <links>
7406                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7407                 </links>
7408         </class>
7409         <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">
7410                 <fields oils_persist:primary="id">
7411                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7412                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7413                 </fields>
7414                 <links>
7415                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7416                 </links>
7417         </class>
7418         <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">
7419                 <fields oils_persist:primary="id">
7420                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7421                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7422                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7423                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7424                 </fields>
7425                 <links>
7426                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7427                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7428                 </links>
7429         </class>
7430         <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">
7431                 <fields oils_persist:primary="xact">
7432                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7433                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7434                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7435                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7436                 </fields>
7437                 <links>
7438                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7439                 </links>
7440         </class>
7441         <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">
7442                 <fields oils_persist:primary="xact">
7443                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7444                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7445                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7446                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7447                 </fields>
7448                 <links>
7449                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7450                 </links>
7451         </class>
7452         <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)">
7453                 <fields oils_persist:primary="id">
7454                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7455                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7456                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7457                 </fields>
7458                 <links>
7459                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7460                 </links>
7461         </class>
7462         <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">
7463                 <fields oils_persist:primary="id">
7464                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7465                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7466                 </fields>
7467                 <links>
7468                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7469                 </links>
7470         </class>
7471         <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">
7472                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7473                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7474                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7475                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7476                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7477                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7478                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7479                 </fields>
7480                 <links>
7481                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7482                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7483                 </links>
7484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7485                         <actions>
7486                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7487                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7488                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7489                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7490                         </actions>
7491                 </permacrud>
7492         </class>
7493         <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">
7494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7495                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7496                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7497                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7498                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7499                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7500                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7501                 </fields>
7502                 <links>
7503                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7504                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7505                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7506                 </links>
7507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7508                         <actions>
7509                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7510                                         <context link="formula" field="owner"/>
7511                                 </create>
7512                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7513                                         <context link="formula" field="owner"/>
7514                                 </retrieve>
7515                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7516                                         <context link="formula" field="owner"/>
7517                                 </update>
7518                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7519                                         <context link="formula" field="owner"/>
7520                                 </delete>
7521                         </actions>
7522                 </permacrud>
7523         </class>
7524
7525         <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">
7526                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7527                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7528                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7529                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7530                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7531                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7532                 </fields>
7533                 <links>
7534                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7535                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7536                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7537                 </links>
7538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7539                         <actions>
7540                                 <create permission="CREATE_PURCHASE_ORDER">
7541                                         <context link="formula" field="owner"/>
7542                 </create>
7543                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7544                                         <context link="formula" field="owner"/>
7545                 </retrieve>
7546                                 <update permission="CREATE_PURCHASE_ORDER">
7547                                         <context link="formula" field="owner"/>
7548                 </update>
7549                                 <delete permission="CREATE_PURCHASE_ORDER">
7550                                         <context link="formula" field="owner"/>
7551                 </delete>
7552                         </actions>
7553                 </permacrud>
7554         </class>
7555
7556         <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">
7557                 <fields oils_persist:primary="id">
7558                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7559                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7560                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7561                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7562                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7563                 </fields>
7564                 <links>
7565                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7566                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7567                 </links>
7568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7569                 </permacrud>
7570         </class>
7571
7572         <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">
7573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7574                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7575                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7576                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7577                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7578                 </fields>
7579                 <links>
7580                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7581                 </links>
7582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7583                         <actions>
7584                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7585                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7586                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7587                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7588                         </actions>
7589                 </permacrud>
7590         </class>
7591
7592         <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">
7593                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7594                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7595                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7596                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7597                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7598                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7599                 </fields>
7600                 <links>
7601                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7602                 </links>
7603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7604                         <actions>
7605                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7606                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7607                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7608                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7609                         </actions>
7610                 </permacrud>
7611         </class>
7612
7613         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7614                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7615                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7616                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7617                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7618                 </fields>
7619                 <links>
7620                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7621                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7622                 </links>
7623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7624                 </permacrud>
7625         </class>
7626
7627         <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">
7628                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7629                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7630                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7631                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7632                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7633                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7634                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7635                 </fields>
7636                 <links>
7637                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7638                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7639                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7640                 </links>
7641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7642                 </permacrud>
7643         </class>
7644
7645         <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">
7646                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7647                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7648                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7649                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7650                 </fields>
7651                 <links>
7652                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7653                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7654                 </links>
7655                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7656                 </permacrud>
7657         </class>
7658
7659         <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">
7660                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7661                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7662                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7663                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7664                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7665                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7666                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7667                 </fields>
7668                 <links>
7669                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7670                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7671                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7672                 </links>
7673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7674                 </permacrud>
7675         </class>
7676
7677         <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">
7678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7679                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7680                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7681                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7682                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7683                 </fields>
7684                 <links>
7685                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7686                 </links>
7687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7688             <actions>
7689                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7690                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7691                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7692                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7693             </actions>
7694                 </permacrud>
7695         </class>
7696
7697         <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">
7698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7699                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7700                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7701                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7702                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7703                 </fields>
7704                 <links>
7705                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7706                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7707                 </links>
7708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7709                         <actions>
7710                                 <create permission="ADMIN_CLAIM_POLICY">
7711                                         <context link="claim_policy" field="org_unit"/>
7712                 </create>
7713                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7714                                         <context link="claim_policy" field="org_unit"/>
7715                 </retrieve>
7716                                 <update permission="ADMIN_CLAIM_POLICY">
7717                                         <context link="claim_policy" field="org_unit"/>
7718                 </update>
7719                                 <delete permission="ADMIN_CLAIM_POLICY">
7720                                         <context link="claim_policy" field="org_unit"/>
7721                 </delete>
7722                         </actions>
7723                 </permacrud>
7724         </class>
7725
7726     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7727         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7728             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7729             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7730             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7731             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7732             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7733             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7734             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7735             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7736             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7737             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7738             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7739             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7740             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7741             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7742             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7743         </fields>
7744     </class>
7745
7746     <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">
7747         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7748             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7749             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7750             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7751             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7752             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7753         </fields>
7754     </class>
7755
7756     <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">
7757         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7758             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7759             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7760             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7761             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7762             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7763             <field reporter:label="City" name="city" reporter:datatype="text"/>
7764             <field reporter:label="State" name="state" reporter:datatype="text"/>
7765             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7766             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7767             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7768         </fields>
7769     </class>
7770
7771     <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">
7772         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7773             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7774             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7775             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7776             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7777             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7778             <field reporter:label="City" name="city" reporter:datatype="text"/>
7779             <field reporter:label="State" name="state" reporter:datatype="text"/>
7780             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7781             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7782             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7783         </fields>
7784     </class>
7785
7786     <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">
7787         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7788             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7789             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7790             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7791             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7792             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7793             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7794         </fields>
7795     </class>
7796
7797         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7798                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7799                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7800                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7801                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7802                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7803                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7804                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7805                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7806                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7807                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7808                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7809                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7810                 </fields>
7811                 <links>
7812                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7813                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7814                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7815                 </links>
7816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7817                 </permacrud>
7818         </class>
7819
7820         <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">
7821                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7822                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7823                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7824                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7825                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7826                 </fields>
7827                 <links>
7828                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7829                 </links>
7830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7831                 </permacrud>
7832         </class>
7833
7834     <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">
7835         <fields>
7836             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7837             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7838             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7839         </fields>
7840                 <links>
7841                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7842                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7843                 </links>
7844     </class>
7845
7846     <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">
7847         <fields>
7848             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7849             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7850         </fields>
7851                 <links>
7852                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7853                 </links>
7854     </class>
7855
7856     <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">
7857         <fields>
7858             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7859             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7860             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7861         </fields>
7862                 <links>
7863                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7864                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7865                 </links>
7866     </class>
7867
7868     <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">
7869         <fields>
7870             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7871             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7872         </fields>
7873                 <links>
7874                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7875                 </links>
7876     </class>
7877
7878     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7879                 <oils_persist:source_definition>
7880
7881             SELECT  DISTINCT l.*
7882               FROM  action.unfulfilled_hold_loops l
7883                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7884               WHERE l.count = m.max
7885
7886                 </oils_persist:source_definition>
7887         <fields>
7888             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7889             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7890             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7891         </fields>
7892                 <links>
7893                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7894                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7895                 </links>
7896     </class>
7897
7898         <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">
7899                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7900                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7901                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7902                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7903                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7904                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7905                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7906                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7907                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7908                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7909                 </fields>
7910                 <links>
7911                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7912                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7913                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7914                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7915                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7916                 </links>
7917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7918                 </permacrud>
7919         </class>
7920
7921         <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">
7922                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7923                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7924                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7925                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7926                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7927                 </fields>
7928                 <links>
7929                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7930                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7931                 </links>
7932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7933                 </permacrud>
7934         </class>
7935
7936         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7937                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7938                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7939                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7940                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7941                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7942                 </fields>
7943                 <links>
7944                 </links>
7945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7946                 </permacrud>
7947         </class>
7948
7949         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7950                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7951                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7952                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7953                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7954                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7955                 </fields>
7956                 <links>
7957                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7958                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7959                 </links>
7960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7961                 </permacrud>
7962         </class>
7963         
7964         <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">
7965                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7966                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7967                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7968                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7969                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7970                 </fields>
7971                 <links>
7972                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7973                 </links>
7974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7975                 </permacrud>
7976         </class>
7977         
7978         <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">
7979                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7980                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7981                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7982                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7983                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7984                 </fields>
7985                 <links>
7986                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7987                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7988                 </links>
7989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7990                 </permacrud>
7991         </class>
7992
7993         <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">
7994                 <fields oils_persist:primary="name">
7995                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7996                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7997                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7998                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7999                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8000                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8001                 </fields>
8002                 <links>
8003                 </links>
8004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8005                 </permacrud>
8006         </class>
8007
8008         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8009                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8010                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8011                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8012                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8013                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8014                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8015                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8016                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8017                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8018                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8019                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8020                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8021                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8022                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8023                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8024                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8025                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8026                 </fields>
8027                 <links>
8028                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8029                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8030                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8031                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8032                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8033                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8034                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8035                 </links>
8036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8037                 </permacrud>
8038         </class>
8039
8040         <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">
8041                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8042                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8043                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8044                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8045                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8046                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8047                 </fields>
8048                 <links>
8049                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8050                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8051                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8052                 </links>
8053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8054                 </permacrud>
8055         </class>
8056
8057         <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">
8058                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8059                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8060                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8061                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8062                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8063                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8064                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8065                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8066                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8067                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8068                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8069                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8070                 </fields>
8071                 <links>
8072                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8073                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8074                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8075                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8076                 </links>
8077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8078                 </permacrud>
8079         </class>
8080
8081         <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">
8082                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8083                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8084                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8085                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8086                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8087                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8088                 </fields>
8089                 <links>
8090                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8091                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8092                 </links>
8093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8094                 </permacrud>
8095         </class>
8096
8097         <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">
8098                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8099                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8100                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8101                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8102                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8103                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8104                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8105                 </fields>
8106                 <links>
8107                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8108                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8109                 </links>
8110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8111                 </permacrud>
8112         </class>
8113
8114         <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">
8115                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8116                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8117                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8118                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8119                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8120                 </fields>
8121                 <links>
8122                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8123                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8124                 </links>
8125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8126                 </permacrud>
8127         </class>
8128
8129         <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">
8130                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8131                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8132                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8133                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8134                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8135                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8136                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8137                 </fields>
8138                 <links>
8139                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8140                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8141                 </links>
8142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8143                 </permacrud>
8144         </class>
8145
8146         <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">
8147                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8148                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8149                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8150                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8151                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8152                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8153                 </fields>
8154                 <links>
8155                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8156                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8157                 </links>
8158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8159                 </permacrud>
8160         </class>
8161
8162         <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">
8163                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8164                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8165                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8166                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8167                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8168                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8169                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8170                 </fields>
8171                 <links>
8172                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8173                 </links>
8174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8175                 </permacrud>
8176         </class>
8177
8178         <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">
8179                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8180                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8181                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8182                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8183                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8184                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8185                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8186                 </fields>
8187                 <links>
8188                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8189                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8190                 </links>
8191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8192                 </permacrud>
8193         </class>
8194
8195         <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">
8196                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8197                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8198                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8199                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8200                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8201                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8202                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8203                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8204                 </fields>
8205                 <links>
8206                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8207                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8208                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8209                 </links>
8210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8211                 </permacrud>
8212         </class>
8213
8214         <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">
8215                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8216                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8217                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8218                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8219                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8220                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8221                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8222                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8223                 </fields>
8224                 <links>
8225                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8226                 </links>
8227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8228                 </permacrud>
8229         </class>
8230
8231         <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">
8232                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8233                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8234                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8235                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8236                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8237                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8238                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8239                 </fields>
8240                 <links>
8241                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8242                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8243                 </links>
8244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8245                 </permacrud>
8246         </class>
8247
8248         <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">
8249                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8250                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8251                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8252                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8253                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8254                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8255                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8256                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8257                 </fields>
8258                 <links>
8259                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8260                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8261                 </links>
8262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8263                 </permacrud>
8264         </class>
8265
8266         <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">
8267                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8268                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8269                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8270                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8271                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8272                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8273                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8274                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8275                 </fields>
8276                 <links>
8277                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8278                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8279                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8280                 </links>
8281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8282                 </permacrud>
8283         </class>
8284
8285         <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">
8286                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8287                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8288                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8289                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8290                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8291                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8292                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8293                 </fields>
8294                 <links>
8295                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8296                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8297                 </links>
8298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8299                 </permacrud>
8300         </class>
8301
8302         <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">
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="Negate?" name="negate" reporter:datatype="bool"/>
8309                 </fields>
8310                 <links>
8311                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8312                 </links>
8313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8314                 </permacrud>
8315         </class>
8316
8317         <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">
8318                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8319                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8320                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8321                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8322                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8323                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8324                 </fields>
8325                 <links>
8326                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8327                 </links>
8328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8329                 </permacrud>
8330         </class>
8331
8332         <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">
8333                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8334                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8335                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8336                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8337                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8338                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8339                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8340                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8341                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8342                 </fields>
8343                 <links>
8344                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8345                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8346                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8347                 </links>
8348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8349                 </permacrud>
8350         </class>
8351
8352         <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">
8353                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8354                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8355                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8356                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8357                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8358                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8359                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8360                 </fields>
8361                 <links>
8362                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8363                 </links>
8364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8365                 </permacrud>
8366         </class>
8367
8368         <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">
8369                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8370                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8371                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8372                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8373                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8374                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8375                 </fields>
8376                 <links>
8377                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8378                 </links>
8379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8380                 </permacrud>
8381         </class>
8382
8383         <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">
8384                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8385                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8386                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8387                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8388                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8389                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8390                 </fields>
8391                 <links>
8392                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8393                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8394                 </links>
8395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8396                 </permacrud>
8397         </class>
8398
8399         <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">
8400                 <fields oils_persist:primary="id">
8401                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8402                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8403                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8404                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8405                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8406                 </fields>
8407                 <links>
8408                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8409                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8410                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8411                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8412                 </links>
8413         </class>
8414
8415         <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">
8416                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8417                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8418                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8419                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8420                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8421                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8422                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8423                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8424                 </fields>
8425                 <links/>
8426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8427                         <actions>
8428                                 <retrieve/>
8429                         </actions>
8430                 </permacrud>
8431         </class>
8432
8433         <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">
8434                 <fields oils_persist:primary="ptype_key">
8435                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8436                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8437                 </fields>
8438                 <links/>
8439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8440                         <actions>
8441                                 <retrieve/>
8442                         </actions>
8443                 </permacrud>
8444         </class>
8445
8446         <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">
8447                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8448                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8449                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8450                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8451                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8452                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8453                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8454                 </fields>
8455                 <links>
8456                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8457                 </links>
8458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8459                         <actions>
8460                                 <retrieve/>
8461                         </actions>
8462                 </permacrud>
8463         </class>
8464
8465         <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">
8466                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8467                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8468                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8469                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8470                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8471                 </fields>
8472                 <links>
8473                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8474                 </links>
8475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8476                         <actions>
8477                                 <retrieve/>
8478                         </actions>
8479                 </permacrud>
8480         </class>
8481
8482         <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">
8483                 <fields oils_persist:primary="code">
8484                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8485                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8486                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8487                 </fields>
8488                 <links/>
8489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8490                         <actions>
8491                                 <retrieve/>
8492                         </actions>
8493                 </permacrud>
8494         </class>
8495
8496         <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">
8497                 <oils_persist:source_definition>
8498
8499             SELECT  b.id,
8500                     MAX(dcp.edit_date) AS last_delete_date
8501              FROM   biblio.record_entry b
8502                     JOIN asset.call_number cn ON (cn.record = b.id)
8503                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8504              WHERE  NOT b.deleted
8505              GROUP BY b.id
8506              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8507
8508                 </oils_persist:source_definition>
8509                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8510                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8511                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8512                 </fields>
8513                 <links>
8514                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8515                 </links>
8516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8517                         <actions>
8518                                 <retrieve/>
8519                         </actions>
8520                 </permacrud>
8521         </class>
8522
8523         <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">
8524                 <oils_persist:source_definition>
8525
8526             -- -- 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.
8527             -- -- 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
8528             -- -- may not.
8529             -- SELECT
8530             --     bre.id AS "bib_id",
8531             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8532             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8533             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8534             -- FROM (
8535                 SELECT
8536                     y.bre AS "id",
8537                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8538                     y.hold_count AS "hold_count",
8539                     (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"
8540                 FROM (
8541                         SELECT
8542                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8543                             COUNT(*) AS "hold_count"
8544                         FROM action.hold_request h
8545                         WHERE
8546                             cancel_time IS NULL
8547                             AND fulfillment_time IS NULL
8548                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8549                         GROUP BY 1
8550                     )y LEFT JOIN (
8551                         SELECT 
8552                             (SELECT id
8553                                 FROM biblio.record_entry 
8554                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8555                             ) AS "bre", 
8556                             COUNT(*) AS "copy_count"
8557                         FROM asset.copy
8558                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8559                         WHERE copy.holdable 
8560                             AND NOT copy.deleted 
8561                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8562                         GROUP BY 1
8563                     )x ON x.bre = y.bre
8564                 -- )z RIGHT JOIN (
8565                 --     SELECT id
8566                 --     FROM biblio.record_entry
8567                 --     WHERE NOT deleted
8568                 -- )bre ON (z.bib_id = bre.id)
8569                 
8570
8571                 </oils_persist:source_definition>
8572                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8573                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8574                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8575                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8576                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8577                 </fields>
8578                 <links>
8579                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8580                 </links>
8581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8582                         <actions>
8583                                 <retrieve/>
8584                         </actions>
8585                 </permacrud>
8586         </class>
8587
8588         <!-- ********************************************************************************************************************* -->
8589         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8590         <!-- ********************************************************************************************************************* -->
8591         <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">
8592                 <fields oils_persist:primary="id">
8593                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8594                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8595                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8596                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8597                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8598                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8599                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8600                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8601                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8602                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8603                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8604                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8605                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8606                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8607                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8608                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8609                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8610                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8611                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8612                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8613                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8614                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8615                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8616                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8617                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8618                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8619                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8620                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8621                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8622                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8623                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8624                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8625                 </fields>
8626                 <links>
8627                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8628                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8629                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8630                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8631                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8632                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8633                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8634                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8635                 </links>
8636         </class>
8637
8638         <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">
8639                 <fields oils_persist:primary="id">
8640                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8641                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8642                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8643                 </fields>
8644                 <links>
8645                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8646                 </links>
8647         </class>
8648
8649         <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">
8650                 <fields oils_persist:primary="id">
8651                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8652                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8653                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8654                 </fields>
8655                 <links>
8656                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8657                 </links>
8658         </class>
8659
8660         <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">
8661                 <fields oils_persist:primary="id">
8662                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8663
8664                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8665                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8666                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8667
8668                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8669                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8670                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8671
8672                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8673                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8674
8675                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8676                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8677                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8678
8679                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8680                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8681
8682                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8683                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8684                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8685
8686                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8687                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8688                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8689
8690                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8691                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8692                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8693                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8694
8695                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8696                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8697
8698                 </fields>
8699                 <links>
8700                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8701                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8702                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8703                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8704                 </links>
8705         </class>
8706
8707         <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">
8708                 <oils_persist:source_definition>
8709
8710             SELECT
8711                 po.ordering_agency AS ordering_agency,
8712                 po.id AS purchase_order,
8713                 li.id AS lineitem,
8714                 lid.id AS lineitem_detail,
8715                 cpa.id AS claim_policy_action
8716             FROM
8717                 acq.lineitem_detail lid
8718                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8719                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8720                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8721                 JOIN acq.claim_policy_action cpa ON (
8722                     cpa.claim_policy = cp.id
8723
8724                     -- we only care about claim policy actions whose claim
8725                     -- interval we'd reached or exceeded
8726                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8727
8728                     -- filter out all claim policy actions where claim events
8729                     -- have occurred on or after the action's action_interval
8730                     AND NOT EXISTS (
8731                         SELECT 1
8732                         FROM
8733                             acq.claim_event evt
8734                             JOIN acq.claim claim ON (
8735                                 claim.id = evt.claim
8736                                 AND claim.lineitem_detail = lid.id
8737                             )
8738                         WHERE
8739                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8740                     )
8741                 )
8742             WHERE
8743                 lid.cancel_reason IS NULL
8744                 AND li.cancel_reason IS NULL -- belt/suspenders
8745                 AND po.cancel_reason IS NULL -- belt/suspenders
8746                 AND lid.recv_time IS NULL
8747                 AND po.state = 'on-order'
8748             ORDER BY 1, 2, 3, 4, 5
8749
8750                 </oils_persist:source_definition>
8751                 <fields>
8752                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8753                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8754                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8755                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8756                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8757                 </fields>
8758                 <links>
8759                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8760                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8761                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8762                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8763                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8764                 </links>
8765         </class>
8766
8767         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8768                 <oils_persist:source_definition>
8769
8770             SELECT 
8771                 li.id AS lineitem, 
8772                 (
8773                     SELECT COUNT(lid.id) 
8774                     FROM acq.lineitem_detail lid
8775                     WHERE lineitem = li.id
8776                 ) AS item_count,
8777                 (
8778                     SELECT COUNT(lid.id) 
8779                     FROM acq.lineitem_detail lid
8780                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8781                 ) AS recv_count,
8782                 (
8783                     SELECT COUNT(lid.id) 
8784                     FROM acq.lineitem_detail lid
8785                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8786                 ) AS cancel_count,
8787                 (
8788                     SELECT COUNT(lid.id) 
8789                     FROM acq.lineitem_detail lid
8790                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8791                     WHERE NOT debit.encumbrance AND lineitem = li.id
8792                 ) AS invoice_count,
8793                 (
8794                     SELECT COUNT(DISTINCT(lid.id)) 
8795                     FROM acq.lineitem_detail lid
8796                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8797                     WHERE lineitem = li.id
8798                 ) AS claim_count,
8799                 (
8800                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8801                     FROM acq.lineitem_detail lid
8802                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8803                 ) AS estimated_amount,
8804                 (
8805                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8806                     FROM acq.lineitem_detail lid
8807                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8808                     WHERE debit.encumbrance AND lineitem = li.id
8809                 ) AS encumbrance_amount,
8810                 (
8811                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8812                     FROM acq.lineitem_detail lid
8813                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8814                     WHERE NOT debit.encumbrance AND lineitem = li.id
8815                 ) AS paid_amount
8816
8817                 FROM acq.lineitem AS li
8818         </oils_persist:source_definition>
8819                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8820                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8821                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8822                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8823                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8824                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8825                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8826                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8827                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8828                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8829                 </fields>
8830                 <links>
8831                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8832                 </links>
8833     </class>
8834
8835
8836         <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">
8837                 <oils_persist:source_definition>
8838
8839                         SELECT  t.*
8840                           FROM  action.transit_copy t
8841                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8842                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8843                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8844
8845                 </oils_persist:source_definition>
8846                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8847                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8848                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8849                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8850                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8851                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8852                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8853                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8854                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8855                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8856                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8857                 </fields>
8858                 <links>
8859                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8860                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8861                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8862                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8863                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8864                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8865                 </links>
8866         </class>
8867
8868     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8869                 <oils_persist:source_definition>
8870
8871         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8872                 SELECT
8873                         cp.id as copy,
8874                         COUNT(circ.id),
8875                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8876                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8877                 FROM
8878                         asset.copy cp
8879                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8880                 GROUP BY 1, 3, 4
8881                 UNION
8882                 SELECT
8883                         cp.id as copy,
8884                         COUNT(circ.id),
8885                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8886                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8887                 FROM
8888                         asset.copy cp
8889                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8890                 GROUP BY 1, 3, 4
8891                 UNION
8892                 SELECT
8893                         id as copy,
8894                         circ_count,
8895                         -1 AS year,
8896                         false as is_renewal
8897                 FROM
8898                         extend_reporter.legacy_circ_count
8899         )x GROUP BY 1, 3, 4
8900
8901                 </oils_persist:source_definition>
8902         <fields>
8903             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8904             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8905             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8906             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8907         </fields>
8908                 <links>
8909                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8910                 </links>
8911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8912                         <actions>
8913                                 <retrieve/>
8914                         </actions>
8915                 </permacrud>
8916     </class>
8917
8918         <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">
8919                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8920                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8921                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8922                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8923                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8924                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8925                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8926                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8927                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8928                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8929                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8930                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8931                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8932                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8933                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8934                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8935                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8936                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8937                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8938                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8939                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8940                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8941                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8942                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8943                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8944                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8945                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8946                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8947                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8948                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8949                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8950                 </fields>
8951                 <links>
8952                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8953                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8954                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8955                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8956                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8957                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8958                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8959                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8960                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8961                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8962                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8963                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8964                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8965                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8966                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8967                 </links>
8968         </class>
8969
8970     <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">
8971         <fields oils_persist:primary="id">
8972             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8973             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8974             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8975             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8976             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8977             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8978             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8979             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8980             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8981             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8982             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8983             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8984             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8985             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8986             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8987             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8988             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8989             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8990             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8991             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8992             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8993             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8994             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8995             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8996             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8997             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8998             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8999             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9000             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9001             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9002             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9003             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9004             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9005             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9006         </fields>
9007         <links>
9008             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9009             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9010             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9011             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9012             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9013         </links>
9014     </class>
9015
9016     <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">
9017         <fields oils_persist:primary="id">
9018             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9019             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9020             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9021             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9022         </fields>
9023         <links>
9024             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9025             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9026         </links>
9027     </class>
9028
9029     <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">
9030         <fields oils_persist:primary="owning_lib">
9031             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9032             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9033             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9034         </fields>
9035         <links>
9036             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9037         </links>
9038     </class>
9039
9040     <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">
9041         <fields oils_persist:primary="id">
9042             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9043             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9044             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9045             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9046             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9047         </fields>
9048         <links>
9049             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9050             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9051             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9052         </links>
9053     </class>
9054
9055     <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">
9056         <fields oils_persist:primary="circ_lib">
9057             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9058             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9059             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9060             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9061         </fields>
9062         <links>
9063             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9064             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9065         </links>
9066     </class>
9067
9068     <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">
9069         <fields oils_persist:primary="id">
9070             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9071             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9072             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9073             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9074             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9075         </fields>
9076         <links>
9077             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9078             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9079             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9080         </links>
9081     </class>
9082
9083     <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">
9084         <fields oils_persist:primary="home_ou">
9085             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9086             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9087             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9088             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9089         </fields>
9090         <links>
9091             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9092             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9093         </links>
9094     </class>
9095         <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">
9096                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9097                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9098                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9099                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9100                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9101                 </fields>
9102                 <links>
9103                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9104                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9105                 </links>
9106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9107                         <actions>
9108                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9109                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9110                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9111                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9112                         </actions>
9113                 </permacrud>
9114         </class>
9115         <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">
9116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9117                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9118                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9119                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9120                 </fields>
9121                 <links>
9122                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9123                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9124                         </links>
9125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9126                 <actions>
9127                                 <create permission="ADMIN_ACQ_FUND_TAG">
9128                                         <context link="tag" field="owner"/>
9129                                 </create>
9130                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9131                                         <context link="tag" field="owner"/>
9132                                 </retrieve>
9133                                 <update permission="ADMIN_ACQ_FUND_TAG">
9134                                         <context link="tag" field="owner"/>
9135                                 </update>
9136                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9137                                         <context link="tag" field="owner"/>
9138                                 </delete>
9139                         </actions>
9140                 </permacrud>
9141         </class>
9142         <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">
9143                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9144                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9145                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9146                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9147                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9148                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9149                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9150                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9151                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9152                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9153                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9154                 </fields>
9155                 <links>
9156                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9157                 </links>
9158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9159                         <actions>
9160                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9161                                 <retrieve/>
9162                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9163                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9164                         </actions>
9165                 </permacrud>
9166         </class>
9167
9168         <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">
9169                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9170                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9171                         <field name="date_applied" reporter:datatype="timestamp"/>
9172                         <field name="org" reporter:datatype="org_unit"/>
9173                         <field name="original_value" reporter:datatype="text"/>
9174                         <field name="new_value" reporter:datatype="text"/>
9175                         <field name="field_name" reporter:datatype="link"/>
9176                 </fields>
9177                 <links>
9178                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9179                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9180                 </links>
9181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9182                         <actions>
9183                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9184                                 <retrieve/>
9185                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9186                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9187                         </actions>
9188                 </permacrud>
9189         </class>
9190
9191
9192         <!-- ********************************************************************************************************************* -->
9193
9194 </IDL>
9195
9196 <!--
9197     vim:noet:ts=4:sw=4:
9198 -->