]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
expose new import options to queue interface importer dialog; mucho import bug fixes...
[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="Owning Library" name="owning_lib" reporter:datatype="int"/>
193                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
194                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
195                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
196                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
197                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
198                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
199                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
200                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
201                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
202                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
203                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
204                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
205                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
206                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
207                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
208                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
209                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
210                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
211                 </fields>
212                 <links>
213                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
214                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
215                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
216                 </links>
217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
218                         <actions>
219                                 <create permission="CREATE_IMPORT_ITEM">
220                     <context link="definition" field="owner"/>
221                                 </create>
222                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </retrieve>
225                                 <update permission="UPDATE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </update>
228                                 <delete permission="DELETE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </delete>
231                         </actions>
232                 </permacrud>
233         </class>
234
235         <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">
236                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
237                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
238                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
239                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
240                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
241                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
242                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
243                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
244                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
245                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
246                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
247                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
248                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
249                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
250                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
251                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
252                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
253                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
254                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
255                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
256                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
257                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
258                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
259                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
260                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
261                 </fields>
262                 <links>
263                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
264                 </links>
265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
266                         <actions>
267                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
268                                 <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"/>
269                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
270                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                         </actions>
272                 </permacrud>
273         </class>
274
275         <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">
276                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
277                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
278                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
279                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
280                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
281                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
282                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
283                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
284                 </fields>
285                 <links>
286                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
287                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
288                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
289                 </links>
290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
291                         <actions>
292                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
293                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
294                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
295                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
296                         </actions>
297                 </permacrud>
298         </class>
299
300         <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">
301                 <fields oils_persist:primary="code">
302                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
303                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
304                 </fields>
305                 <links>
306                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
307                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
308                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
309                 </links>
310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
311                         <actions>
312                                 <retrieve/>
313                         </actions>
314                 </permacrud>
315         </class>
316
317         <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">
318                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
319                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
320                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
321                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
322                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
323                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
324                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
325                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
326                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
327                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
328                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
329                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
330                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
331                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
332                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
333                 </fields>
334                 <links>
335                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
336                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
337                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
338                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
339             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
340             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
341             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
342                 </links>
343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
344                         <actions>
345                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
346                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
347                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
348                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
349                         </actions>
350                 </permacrud>
351         </class>
352
353         <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">
354                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
355                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
356                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
357                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
358                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
359                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
360                 </fields>
361                 <links/>
362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
363                         <actions>
364                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
365                 <retrieve/>
366                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
367                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
368                         </actions>
369                 </permacrud>
370         </class>
371
372         <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">
373                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
374                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
375                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
376                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
377                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
378                 </fields>
379                 <links>
380                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
381                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
382                 </links>
383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
384                         <actions>
385                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
387                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
388                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
389                         </actions>
390                 </permacrud>
391         </class>
392
393         <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">
394                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
395                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
396                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
397                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
398                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
399                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
400                 </fields>
401                 <links>
402                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
403                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
404                 </links>
405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
406                         <actions>
407                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
408                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
409                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
410                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
411                         </actions>
412                 </permacrud>
413         </class>
414
415         <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">
416                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
417                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
418                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
419                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
420                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
421                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
422                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
423                 </fields>
424                 <links>
425                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
426                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
427                 </links>
428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
429                         <actions>
430                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
431                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
432                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
433                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                         </actions>
435                 </permacrud>
436         </class>
437
438         <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">
439                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
440                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
441                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
442                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
443                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
444                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
445                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
446                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
447                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
448                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
449                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
450                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
451                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
452                 </fields>
453                 <links>
454                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
455                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
456                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
457             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
458             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
459                 </links>
460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
461                         <actions>
462                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
463                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
464                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
465                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                         </actions>
467                 </permacrud>
468         </class>
469
470         <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">
471                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
472                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
473                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
474                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
475                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
476                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
477                 </fields>
478                 <links/>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
482                 <retrieve/>
483                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
484                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <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">
490                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
491                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
492                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
493                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
494                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
495                 </fields>
496                 <links>
497                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
498                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
499                 </links>
500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501                         <actions>
502                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
503                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
504                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
505                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                         </actions>
507                 </permacrud>
508         </class>
509
510         <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">
511                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
512                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
513                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
514                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
515                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
516                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
517                 </fields>
518                 <links>
519                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
520                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
521                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
522                 </links>
523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
524                         <actions>
525                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                         </actions>
530                 </permacrud>
531         </class>
532
533         <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">
534                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
535                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
536                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
537                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
538                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
539                 </fields>
540                 <links>
541                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
542                 </links>
543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
544                         <actions>
545                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
546                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                         </actions>
550                 </permacrud>
551         </class>
552
553         <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">
554                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
555                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
556                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
557                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
558                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
559                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
560                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
561                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
562             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
563                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
564                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
565                 </fields>
566                 <links>
567                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
568                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
569                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
570                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="ADMIN_IMPORT_MATCH_SET">
575                     <context link="match_set" field="owner"/>
576                                 </create>
577                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
578                     <context link="match_set" field="owner"/>
579                                 </retrieve>
580                                 <update permission="ADMIN_IMPORT_MATCH_SET">
581                     <context link="match_set" field="owner"/>
582                                 </update>
583                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
584                     <context link="match_set" field="owner"/>
585                                 </delete>
586                         </actions>
587                 </permacrud>
588         </class>
589
590         <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">
591                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
592                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
593                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
594                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
595                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
596                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
597                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
598                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
599                 </fields>
600                 <links>
601                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
602                 </links>
603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
604                         <actions>
605                                 <create permission="ADMIN_IMPORT_MATCH_SET">
606                     <context link="match_set" field="owner"/>
607                                 </create>
608                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
609                     <context link="match_set" field="owner"/>
610                                 </retrieve>
611                                 <update permission="ADMIN_IMPORT_MATCH_SET">
612                     <context link="match_set" field="owner"/>
613                                 </update>
614                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
615                     <context link="match_set" field="owner"/>
616                                 </delete>
617                         </actions>
618                 </permacrud>
619         </class>
620
621         <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">
622                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
623                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
624                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
625                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
626                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
627                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
628                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
629                 </fields>
630                 <links>
631                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
633                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
635                 </links>
636         </class>
637
638     <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">
639         <fields oils_persist:primary="name">
640             <field reporter:label="Name" name="name" reporter:datatype="text"/>
641             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
642             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
643             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
644         </fields>
645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
646             <actions>
647                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
648                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651             </actions>
652         </permacrud>
653     </class>
654
655     <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">
656         <fields oils_persist:primary="id">
657             <field reporter:label="ID" name="id" reporter:datatype="id"/>
658             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
659             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
661             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
662         </fields>
663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
664             <actions>
665                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
666                 <retrieve/>
667                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
668                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669             </actions>
670         </permacrud>
671     </class>
672
673         <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">
674                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
675                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
676                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
677                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
678                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
679                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
680                 </fields>
681                 <links>
682                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
683                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
684                 </links>
685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
686             <actions>
687                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
688                 <retrieve/>
689                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
690                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691             </actions>
692         </permacrud>
693         </class>
694
695         <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">
696                 <fields oils_persist:primary="name">
697                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
698                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
699                         <field reporter:label="Description" name="description" reporter:datatype="text" />
700                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
701                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
702                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
703                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
704                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
705                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
706                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
707                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
708                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
709                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
710                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
711                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
712                 </fields>
713                 <links>
714                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
715                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
716                 </links>
717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
718             <actions>
719                 <create permission="ADMIN_SVF" global_required="true"/>
720                 <retrieve/>
721                 <update permission="ADMIN_SVF" global_required="true"/>
722                 <delete permission="ADMIN_SVF" global_required="true"/>
723             </actions>
724         </permacrud>
725         </class>
726
727         <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">
728                 <fields oils_persist:primary="id">
729                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
730                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
731                 </fields>
732                 <links>
733                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
734                 </links>
735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
736             <actions>
737                 <retrieve/>
738             </actions>
739         </permacrud>
740         </class>
741
742         <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">
743                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
744                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
745                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
746                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
747                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
748                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
749                 </fields>
750                 <links>
751                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
752                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
753                 </links>
754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
755             <actions>
756                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
757                 <retrieve/>
758                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
759                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
760             </actions>
761         </permacrud>
762         </class>
763
764         <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">
765                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
766                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
767                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
768                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
769                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
770                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
771                 </fields>
772                 <links>
773                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
774                 </links>
775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
776             <actions>
777                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
778                 <retrieve/>
779                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
780                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
781             </actions>
782         </permacrud>
783         </class>
784
785         <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">
786                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
787                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
788                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
789                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
790                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
791                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
792                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
793                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
794                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
795                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
796                 </fields>
797                 <links>
798                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
799                 </links>
800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
801             <actions>
802                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
803                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
804                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
805                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
806             </actions>
807         </permacrud>
808         </class>
809
810     <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">
811         <fields oils_persist:primary="name">
812             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
813             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
814             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
815             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
816             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
817             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
818             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
819             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
820             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
821         </fields>
822         <links>
823             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
824         </links>
825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
826             <actions>
827                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
828                 <retrieve/>
829                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
830                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
831             </actions>
832         </permacrud>
833     </class>
834
835     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
836         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
837             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
838             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
839             <field reporter:label="Name" name="name" reporter:datatype="text"/>
840             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
841             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
842             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
843             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
844         </fields>
845         <links>
846             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
847         </links>
848     </class>
849
850         <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">
851                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
852                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
853                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
854                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
855                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
856                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
857                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
858                 </fields>
859                 <links>
860             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
861             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
862                 </links>
863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
864                         <actions>
865                                 <retrieve/>
866                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
867                         </actions>
868                 </permacrud>
869         </class>
870
871         <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">
872                 <fields oils_persist:primary="key">
873                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
874                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
875                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
876                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
877                 </fields>
878                 <links/>
879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
880                         <actions>
881                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
882                                 <retrieve/>
883                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
884                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
885                         </actions>
886                 </permacrud>
887         </class>
888
889         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
890                 <fields oils_persist:primary="module">
891                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
892                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
893                 </fields>
894                 <links/>
895         </class>
896
897         <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">
898                 <fields oils_persist:primary="module">
899                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
900                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
901                 </fields>
902                 <links/>
903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
904                         <actions>
905                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
906                                 <retrieve/>
907                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
908                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
909                         </actions>
910                 </permacrud>
911         </class>
912
913         <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">
914                 <fields oils_persist:primary="module">
915                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
916                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
917                 </fields>
918                 <links/>
919                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
920                         <actions>
921                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
922                                 <retrieve/>
923                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
924                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
925                         </actions>
926                 </permacrud>
927         </class>
928
929         <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">
930                 <fields oils_persist:primary="module">
931                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                 </fields>
934                 <links/>
935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
936                         <actions>
937                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
938                                 <retrieve/>
939                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
940                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
941                         </actions>
942                 </permacrud>
943         </class>
944
945         <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">
946                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
947                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
948                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
949                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
950                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
951                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
952                 </fields>
953                 <links>
954                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
955                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
956                 </links>
957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
958                         <actions>
959                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
960                     <context link="event_def" field="owner"/>
961                 </create>
962                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
963                     <context link="event_def" field="owner"/>
964                 </retrieve>
965                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
966                     <context link="event_def" field="owner"/>
967                 </update>
968                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
969                     <context link="event_def" field="owner"/>
970                 </delete>
971                         </actions>
972                 </permacrud>
973         </class>
974
975         <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">
976                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
977                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
978                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
979                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
980                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
981                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
982                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
983                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
984                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
985                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
986                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
987                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
988                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
989                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
990                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
991                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
992                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
993                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
994                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
995                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
996                 </fields>
997                 <links>
998                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
999                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1000                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1001                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1002                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1003                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1004                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1005                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1006                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1007                 </links>
1008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1009                         <actions>
1010                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1011                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1012                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1013                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1014                         </actions>
1015                 </permacrud>
1016         </class>
1017
1018         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1019                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1020                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1021                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1022                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1023                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1024                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1025                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1026                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1027                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1028                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1029                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1030                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1031                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1032                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1033                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1034                 </fields>
1035                 <links>
1036                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1037                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1038                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1039                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1040                 </links>
1041         </class>
1042
1043         <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">
1044                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1045                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1046                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1047                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1048                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1049                 </fields>
1050                 <links>
1051                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1052                 </links>
1053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1054                         <actions>
1055                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1056                     <context link="event_def" field="owner"/>
1057                 </create>
1058                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1059                     <context link="event_def" field="owner"/>
1060                 </retrieve>
1061                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1062                     <context link="event_def" field="owner"/>
1063                 </update>
1064                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1065                     <context link="event_def" field="owner"/>
1066                 </delete>
1067                         </actions>
1068                 </permacrud>
1069         </class>
1070
1071         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1073                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1074                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1075                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1076                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1077                 </fields>
1078                 <links>
1079                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1080                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1081                 </links>
1082         </class>
1083
1084         <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">
1085                 <fields oils_persist:primary="code">
1086                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1087                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1088                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1089                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1090                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1091                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1092                 </fields>
1093                 <links/>
1094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1095             <actions>
1096                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1097                 <retrieve/>
1098                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1099                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1100             </actions>
1101         </permacrud>
1102         </class>
1103
1104         <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">
1105                 <fields oils_persist:primary="code">
1106                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1107                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1108                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1109                 </fields>
1110                 <links/>
1111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1112             <actions>
1113                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1114                 <retrieve/>
1115                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1116                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1117             </actions>
1118         </permacrud>
1119         </class>
1120
1121         <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">
1122                 <fields oils_persist:primary="code">
1123                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1124                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1125                 </fields>
1126                 <links/>
1127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1128             <actions>
1129                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1130                 <retrieve/>
1131                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1132                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1133             </actions>
1134         </permacrud>
1135         </class>
1136
1137         <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">
1138                 <fields oils_persist:primary="code">
1139                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1140                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1141                 </fields>
1142                 <links/>
1143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1144             <actions>
1145                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1146                 <retrieve/>
1147                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1148                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <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">
1154                 <fields oils_persist:primary="code">
1155                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1156                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1157                 </fields>
1158                 <links/>
1159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1160             <actions>
1161                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1162                 <retrieve/>
1163                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1164                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1165             </actions>
1166         </permacrud>
1167         </class>
1168
1169         <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">
1170                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1171                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1172                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1173                 </fields>
1174                 <links/>
1175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1176             <actions>
1177                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1178                 <retrieve/>
1179                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1180                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1181             </actions>
1182         </permacrud>
1183         </class>
1184
1185         <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">
1186                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1187                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1188                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1189                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1190                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1191                 </fields>
1192         <links>
1193             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1194             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1195             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="UPDATE_COPY">
1200                     <context link="target_copy" field="circ_lib"/>
1201                 </create>
1202                 <retrieve/>
1203                 <update permission="UPDATE_COPY">
1204                     <context link="target_copy" field="circ_lib"/>
1205                 </update>
1206                 <delete permission="UPDATE_COPY">
1207                     <context link="target_copy" field="circ_lib"/>
1208                 </delete>
1209             </actions>
1210         </permacrud>
1211         </class>
1212
1213         <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">
1214                 <fields oils_persist:primary="code">
1215                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1216                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1217                 </fields>
1218                 <links/>
1219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1220             <actions>
1221                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1222                 <retrieve/>
1223                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1224                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1225             </actions>
1226         </permacrud>
1227         </class>
1228
1229         <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">
1230                 <fields oils_persist:primary="code">
1231                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1232                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1233                 </fields>
1234                 <links/>
1235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1236             <actions>
1237                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1238                 <retrieve/>
1239                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1240                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1241             </actions>
1242         </permacrud>
1243         </class>
1244
1245         <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">
1246                 <fields oils_persist:primary="code">
1247                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1248                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1249                 </fields>
1250                 <links/>
1251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1252             <actions>
1253                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1254                 <retrieve/>
1255                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1256                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1257             </actions>
1258         </permacrud>
1259         </class>
1260
1261     <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">
1262         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1263             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1264             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1265             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1266             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1267             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1268             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1269             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1270             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1271             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1272             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1273             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1274             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1275             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1276             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1277             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1278         </fields>
1279         <links/>
1280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1281             <actions>
1282                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1283                 <retrieve/>
1284                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1285                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1286             </actions>
1287         </permacrud>
1288     </class>
1289
1290     <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">
1291         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1292             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1293             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1294             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1295             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1296             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1297             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1298             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1299             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1300             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1301             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1302             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1303             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1304             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1305             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1306             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1307         </fields>
1308         <links/>
1309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1310             <actions>
1311                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1312                 <retrieve/>
1313                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1314                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1315             </actions>
1316         </permacrud>
1317     </class>
1318
1319     <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">
1320         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1321             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1322             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1323             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1324             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1325             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1326         </fields>
1327         <links>
1328             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1329             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1330             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1331         </links>
1332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1333             <actions>
1334                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1335                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1336                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1337                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1338             </actions>
1339         </permacrud>
1340     </class>
1341
1342         <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">
1343                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1344                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1345                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1346                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1347                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1348                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1349                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1350                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1351                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1352                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1353                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1354                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1355                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1356                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1357                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1358                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1359                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1360             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1361                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1362                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1363                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1364                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1365                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1366                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1367                 </fields>
1368                 <links>
1369                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1370                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1371                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1372                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1373                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1374                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1375                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1376                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1377                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1378                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1379                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1380                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1381                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1382             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1383                 </links>
1384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1385             <actions>
1386                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1387                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1388                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1389                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1390             </actions>
1391         </permacrud>
1392         </class>
1393
1394         <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">
1395                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1396                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1397                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1398                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1399                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1400                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1401                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1402                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1403                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1404                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1405                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1406                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1407                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1408                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1409                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1410             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1411                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1412                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1413             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1414                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1415                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1416                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1417                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1418             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1419             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1420             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1421                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1422                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1423                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1424                 </fields>
1425                 <links>
1426                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1427                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1428                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1429                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1430                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1431                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1432                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1433                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1434                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1435                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1436                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1437                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1438                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1439             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1440                 </links>
1441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1442             <actions>
1443                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1444                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1445                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1446                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1447             </actions>
1448         </permacrud>
1449         </class>
1450
1451         <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">
1452                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1453                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1454                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1455                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1456                 </fields>
1457                 <links>
1458                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1459                 </links>
1460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1461             <actions>
1462                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1463                     <context link="matchpoint" field="org_unit"/>
1464                 </create>
1465                 <retrieve/>
1466                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1467                     <context link="matchpoint" field="org_unit"/>
1468                 </update>
1469                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1470                     <context link="matchpoint" field="org_unit"/>
1471                 </delete>
1472             </actions>
1473         </permacrud>
1474         </class>
1475
1476         <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">
1477                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1478                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1479                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1480                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1481                 </fields>
1482                 <links>
1483                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1484                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1485                 </links>
1486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1487             <actions>
1488                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1489                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1490                 </create>
1491                 <retrieve/>
1492                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1493                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1494                 </update>
1495                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1496                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1497                 </delete>
1498             </actions>
1499         </permacrud>
1500         </class>
1501
1502         <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">
1503                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1504                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1505                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1506                 </fields>
1507                 <links/>
1508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1509             <actions>
1510                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1511                 <retrieve/>
1512                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1513                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1514             </actions>
1515         </permacrud>
1516         </class>
1517
1518         <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">
1519                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1520                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1521                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1522                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1523                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1524                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1525                 </fields>
1526                 <links>
1527                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1528                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1529                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1530                 </links>
1531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1532             <actions>
1533                 <create permission="ADMIN_SURVEY">
1534                     <context link="survey" field="owner"/>
1535                 </create>
1536                 <retrieve/>
1537                 <update permission="ADMIN_SURVEY">
1538                     <context link="survey" field="owner"/>
1539                 </update>
1540                 <delete permission="ADMIN_SURVEY">
1541                     <context link="survey" field="owner"/>
1542                 </delete>
1543             </actions>
1544         </permacrud>
1545         </class>
1546         <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">
1547                 <fields oils_persist:primary="id" oils_persist:sequence="">
1548                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1549                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1550                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1551                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1552                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1553                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1554                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1555                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1556                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1557                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1558                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1559                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1560                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1561                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1562                 </fields>
1563                 <links>
1564                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1565                 </links>
1566         </class>
1567         <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">
1568                 <fields oils_persist:primary="id" oils_persist:sequence="">
1569                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1570                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1571                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1572                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1573                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1574                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1575                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1576                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1577                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1578                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1579                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1580                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1581                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1582                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1583                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1584                 </fields>
1585                 <links>
1586                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1587                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1588                 </links>
1589         </class>
1590         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1591                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1592                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1593                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1594                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1595                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1596                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1597                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1598                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1599                 </fields>
1600                 <links>
1601                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1602                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1603                 </links>
1604         </class>
1605         <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">
1606                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1607                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1608                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1609                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1610                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1611                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1612                 </fields>
1613                 <links>
1614                         <link field="usr" reltype="has_a" key="id" class="au"/>
1615                 </links>
1616         </class>
1617         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1618                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1619                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1620                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1621                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1622                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1623                 </fields>
1624                 <links>
1625                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1626                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1627                 </links>
1628         </class>
1629         <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">
1630                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1631                         <field name="field" reporter:datatype="link"/>
1632                         <field name="id" reporter:datatype="id" />
1633                         <field name="source" reporter:datatype="link"/>
1634                         <field name="value" reporter:datatype="text"/>
1635                 </fields>
1636                 <links>
1637                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1638                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1639                 </links>
1640         </class>
1641         <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">
1642                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1643                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1644                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1645                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1646                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1647                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1648                 </fields>
1649                 <links>
1650                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1651                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1652                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1653                 </links>
1654         </class>
1655         <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">
1656                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1657                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1658                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1659                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1660                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1661                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1662                 </fields>
1663                 <links>
1664                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1665                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1666                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1667                 </links>
1668         </class>
1669         <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">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1671                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1672                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1673                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1674                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1675                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1676                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1677                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1678                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1679                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1680                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1681                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1682                 </fields>
1683                 <links>
1684                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1685                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1686                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1687                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1688                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1689                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1690                 </links>
1691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1692             <actions>
1693                 <create permission="TRANSIT_COPY" context_field="owner">
1694                     <context link="target_copy" field="circ_lib"/>
1695                 </create>
1696                 <retrieve/>
1697                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1698                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1699             </actions>
1700         </permacrud>
1701         </class>
1702         <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">
1703                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1704                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1705                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1706                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1707                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1708                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1709                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1710                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1711                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1712                 </fields>
1713                 <links>
1714                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1715                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1716                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1717                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1718                 </links>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="ADMIN_SURVEY">
1722                     <context link="survey" field="owner"/>
1723                 </create>
1724                 <retrieve/>
1725                 <update permission="ADMIN_SURVEY">
1726                     <context link="survey" field="owner"/>
1727                 </update>
1728                 <delete permission="ADMIN_SURVEY">
1729                     <context link="survey" field="owner"/>
1730                 </delete>
1731             </actions>
1732         </permacrud>
1733         </class>
1734         <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">
1735                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1736                         <field name="bucket" />
1737                         <field name="id" reporter:datatype="id" />
1738                         <field name="target_copy" reporter:datatype="link"/>
1739                         <field name="create_time" reporter:datatype="timestamp" />
1740                         <field name="pos" reporter:datatype="int" />
1741                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1742                 </fields>
1743                 <links>
1744                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1745                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1746             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1747                 </links>
1748         </class>
1749         <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">
1750                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1751                         <field name="id" reporter:datatype="id" />
1752                         <field name="item" reporter:datatype="link"/>
1753                         <field name="note" reporter:datatype="text" />
1754                 </fields>
1755                 <links>
1756                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1757                 </links>
1758         </class>
1759         <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">
1760                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1761                         <field name="active" reporter:datatype="bool"/>
1762                         <field name="create_date" reporter:datatype="timestamp"/>
1763                         <field name="creator" />
1764                         <field name="deleted" reporter:datatype="bool"/>
1765                         <field name="edit_date" reporter:datatype="timestamp"/>
1766                         <field name="editor" />
1767                         <field name="id" reporter:datatype="id" />
1768                         <field name="last_xact_id" />
1769                         <field name="marc" />
1770                         <field name="source" />
1771                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1772                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1773                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1774                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1775                 </fields>
1776                 <links>
1777                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1778                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1779                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1780                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1781                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1782                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1783                 </links>
1784                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1785                         <actions>
1786                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1787                                 <retrieve/>
1788                                 <update permission="UPDATE_MARC" global_required="true"/>
1789                                 <delete permission="UPDATE_MARC" global_required="true"/>
1790                         </actions>
1791                 </permacrud>
1792         </class>
1793         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1794                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1795                         <field name="char_encoding" />
1796                         <field name="id" />
1797                         <field name="record" />
1798                         <field name="record_status" />
1799                 </fields>
1800                 <links>
1801                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1802                 </links>
1803         </class>
1804         <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">
1805                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1806                         <field name="id" reporter:datatype="id" />
1807                         <field name="bib" reporter:datatype="link" />
1808                         <field name="authority" reporter:datatype="link" />
1809                 </fields>
1810                 <links>
1811                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1812                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1813                 </links>
1814         </class>
1815         <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">
1816                 <fields oils_persist:primary="code" oils_persist:sequence="">
1817                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1818                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1819                 </fields>
1820                 <links/>
1821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1822             <actions>
1823                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1824                 <retrieve/>
1825                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1826                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1827             </actions>
1828         </permacrud>
1829         </class>
1830         <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">
1831                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1832                         <field name="accepting_usr" />
1833                         <field name="amount" reporter:datatype="money" />
1834                         <field name="amount_collected" reporter:datatype="money" />
1835                         <field name="approval_code" reporter:datatype="text"/>
1836                         <field name="cash_drawer" reporter:datatype="link"/>
1837                         <field name="cc_first_name" reporter:datatype="text"/>
1838                         <field name="cc_last_name" reporter:datatype="text"/>
1839                         <field name="cc_number" reporter:datatype="text"/>
1840                         <field name="cc_order_number" reporter:datatype="text"/>
1841                         <field name="cc_type" reporter:datatype="text"/>
1842                         <field name="cc_processor" reporter:datatype="text"/>
1843                         <field name="expire_month" reporter:datatype="int" />
1844                         <field name="expire_year" reporter:datatype="int" />
1845                         <field name="id" reporter:datatype="id" />
1846                         <field name="note" reporter:datatype="text"/>
1847                         <field name="payment_ts" reporter:datatype="timestamp"/>
1848                         <field name="xact" reporter:datatype="link"/>
1849                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1850                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1851                 </fields>
1852                 <links>
1853                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1854                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1855                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1856                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1857                 </links>
1858         </class>
1859         <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">
1860                 <fields oils_persist:primary="name">
1861                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1862                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1863                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1864                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1865                 </fields>
1866                 <links/>
1867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1868             <actions>
1869                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1870                 <retrieve/>
1871                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1872                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1873             </actions>
1874         </permacrud>
1875         </class>
1876
1877         <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">
1878                 <fields oils_persist:primary="alias">
1879                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1880                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1881                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1882                 </fields>
1883                 <links>
1884                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1885                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1886                 </links>
1887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1888             <actions>
1889                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1890                 <retrieve/>
1891                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1892                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1893             </actions>
1894         </permacrud>
1895         </class>
1896
1897         <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">
1898                 <fields oils_persist:primary="name">
1899                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1900                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1901                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1902                 </fields>
1903                 <links>
1904                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1905                 </links>
1906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1907             <actions>
1908                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1909                 <retrieve/>
1910                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1911                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1912             </actions>
1913         </permacrud>
1914         </class>
1915
1916         <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">
1917                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1918                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1919                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1920                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1921                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1922                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1923                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1924                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1925                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1926                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1927                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1928                 </fields>
1929                 <links>
1930                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1931                 </links>
1932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1933             <actions>
1934                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1935                 <retrieve/>
1936                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1937                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1938             </actions>
1939         </permacrud>
1940         </class>
1941         <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">
1942                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1943                         <field name="id" reporter:datatype="id" />
1944                         <field name="name" reporter:datatype="text"/>
1945                         <field name="xpath" reporter:datatype="text"/>
1946                         <field name="format" reporter:datatype="link"/>
1947                         <field name="first_word" reporter:datatype="bool" />
1948                 </fields>
1949                 <links/>
1950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1951             <actions>
1952                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1953                 <retrieve/>
1954                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1955                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1956             </actions>
1957         </permacrud>
1958         </class>
1959         <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">
1960                 <fields oils_persist:primary="code" oils_persist:sequence="">
1961                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1962                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1963                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1964                 </fields>
1965                 <links/>
1966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1967             <actions>
1968                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1969                 <retrieve/>
1970                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1971                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1972             </actions>
1973         </permacrud>
1974         </class>
1975         <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">
1976                 <fields oils_persist:primary="code" oils_persist:sequence="">
1977                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1978                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1979                 </fields>
1980                 <links/>
1981         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1982             <actions>
1983                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1984                 <retrieve/>
1985                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1986                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1987             </actions>
1988         </permacrud>
1989         </class>
1990     <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">
1991         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1992             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1993             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1994             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1995             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1996         </fields>
1997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1998             <actions>
1999                 <retrieve/>
2000             </actions>
2001         </permacrud>
2002     </class>
2003         <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">
2004                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2005                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2006                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2007                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2008                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2009                 </fields>
2010                 <links>
2011                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2012                 </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2016                 <retrieve/>
2017                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2018                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2019             </actions>
2020         </permacrud>
2021         </class>
2022         <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">
2023                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2024                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2025                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2026                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2027                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2028                 </fields>
2029                 <links>
2030                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2031                 </links>
2032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2033             <actions>
2034                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2035                 <retrieve/>
2036                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2037                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2038             </actions>
2039         </permacrud>
2040         </class>
2041         <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">
2042                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2043                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2044                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2045                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2046                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2047                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2048                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2049                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2050                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2051                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2052                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2053                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2054                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2055                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2056                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2057                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2058                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2059                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2060                 </fields>
2061                 <links>
2062                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2063                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2064                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2065                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2066                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2067                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2068                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2069                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2070                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2071                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2072                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2073                 </links>
2074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2075             <actions>
2076                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2077                 <retrieve/>
2078                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2079                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2080             </actions>
2081         </permacrud>
2082         </class>
2083         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2084                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2085                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2086                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2087                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2088                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2089                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2090                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2091                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2092                 </fields>
2093                 <links>
2094                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2095                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2096         </links>
2097         </class>
2098         <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">
2099                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2100                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2101                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2102                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2103                 </fields>
2104                 <links>
2105                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2106                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2107                 </links>
2108         </class>
2109         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2110                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2111                         <field name="id" reporter:datatype="id" />
2112                         <field name="value" oils_persist:i18n="true" />
2113                 </fields>
2114                 <links/>
2115         </class>
2116         <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">
2117                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2118                         <field name="balance_owed" reporter:datatype="money" />
2119                         <field name="total_owed" reporter:datatype="money" />
2120                         <field name="total_paid" reporter:datatype="money" />
2121                         <field name="usr" reporter:datatype="link"/>
2122                 </fields>
2123                 <links>
2124                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2125         </links>
2126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2127             <actions>
2128                 <retrieve permission="VIEW_USER">
2129                     <context link="usr" field="home_ou"/>
2130                 </retrieve>
2131             </actions>
2132         </permacrud>
2133         </class>
2134         <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">
2135                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2136                         <field name="collector" />
2137                         <field name="enter_time" reporter:datatype="timestamp"/>
2138                         <field name="id" reporter:datatype="id" />
2139                         <field name="location" reporter:datatype="link"/>
2140                         <field name="usr" reporter:datatype="link"/>
2141                 </fields>
2142                 <links>
2143                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2144                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2145                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2146                 </links>
2147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2148             <actions>
2149                 <create permission="money.collections_tracker.create" context_field="location"/>
2150                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2151                 <delete permission="money.collections_tracker.create" context_field="location"/>
2152             </actions>
2153         </permacrud>
2154         </class>
2155         <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">
2156                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2157                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2158                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2159                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2160                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2161                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2162                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2163                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2164                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2165                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2166                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2167                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2168                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2169                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2170                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2171                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2172                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2173                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2174                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2175                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2176                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2177                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2178                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2179                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2180                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2181                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2182                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2183                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2184                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2185                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2186                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2187                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2188                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2189                 </fields>
2190                 <links>
2191                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2192                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2193                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2194                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2195                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2196                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2197                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2198                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2199                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2200                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2201                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2202                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2203                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2204                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2205                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2206                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2207                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2208                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2209                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2210                 </links>
2211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2212             <actions>
2213                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2214                 <retrieve/>
2215                 <update permission="UPDATE_MARC" global_required="true"/>
2216             </actions>
2217         </permacrud>
2218         </class>
2219         <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">
2220                 <fields oils_persist:primary="id">
2221                         <field name="dow_0_close" />
2222                         <field name="dow_0_open" />
2223                         <field name="dow_1_close" />
2224                         <field name="dow_1_open" />
2225                         <field name="dow_2_close" />
2226                         <field name="dow_2_open" />
2227                         <field name="dow_3_close" />
2228                         <field name="dow_3_open" />
2229                         <field name="dow_4_close" />
2230                         <field name="dow_4_open" />
2231                         <field name="dow_5_close" />
2232                         <field name="dow_5_open" />
2233                         <field name="dow_6_close" />
2234                         <field name="dow_6_open" />
2235                         <field name="id" reporter:datatype="id" />
2236                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2237                 </fields>
2238                 <links>
2239                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2240                 </links>
2241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2242             <actions>
2243                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2244                 <retrieve/>
2245                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2246                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2247             </actions>
2248         </permacrud>
2249         </class>
2250         <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">
2251                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2252                         <field name="id" reporter:datatype="id" />
2253                         <field name="record" reporter:datatype="link"/>
2254                         <field name="label" reporter:datatype="text"/>
2255                         <field name="label_sortkey" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2259                 </links>
2260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2261             <actions>
2262                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2263                 <retrieve/>
2264                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2265                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2266             </actions>
2267         </permacrud>
2268         </class>
2269         <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">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2271                         <field name="id" reporter:datatype="id" />
2272                         <field name="target_copy" reporter:datatype="link" />
2273                         <field name="part" reporter:datatype="link"/>
2274                 </fields>
2275                 <links>
2276                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2277                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2278                 </links>
2279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2280             <actions>
2281                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2282                 <retrieve/>
2283                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2284                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2285             </actions>
2286         </permacrud>
2287         </class>
2288         <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">
2289                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2290                         <field name="close_end" reporter:datatype="timestamp" />
2291                         <field name="close_start" reporter:datatype="timestamp" />
2292                         <field name="id" reporter:datatype="id" />
2293                         <field name="org_unit" reporter:datatype="org_unit"/>
2294                         <field name="reason" reporter:datatype="text"/>
2295                 </fields>
2296                 <links>
2297                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2298                 </links>
2299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2300             <actions>
2301                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2302                 <retrieve/>
2303                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2304                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2305             </actions>
2306         </permacrud>
2307         </class>
2308         <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">
2309                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2310                         <field name="extended" reporter:datatype="interval"/>
2311                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2312                         <field name="max_renewals" reporter:datatype="int" />
2313                         <field name="name" reporter:datatype="text"/>
2314                         <field name="normal" reporter:datatype="interval"/>
2315                         <field name="shrt" reporter:datatype="interval"/>
2316                 </fields>
2317                 <links>
2318                 </links>
2319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2320             <actions>
2321                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2322                 <retrieve/>
2323                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2324                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2325             </actions>
2326         </permacrud>
2327         </class>
2328
2329         <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">
2330                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2331                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2332                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2333             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2334                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2335             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2336                 </fields>
2337                 <links>
2338             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2339                 </links>
2340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2341             <actions>
2342                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2343                 <retrieve/>
2344                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2345                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2346             </actions>
2347                 </permacrud>
2348         </class>
2349
2350         <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">
2351                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2352                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2353                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2354                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2355             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2356                 </fields>
2357                 <links>
2358                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2359                 </links>
2360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2361             <actions>
2362                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2363                 <retrieve/>
2364                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2365                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2366             </actions>
2367                 </permacrud>
2368         </class>
2369
2370         <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">
2371                 <fields oils_persist:primary="id" oils_persist:sequence="">
2372                         <field name="balance_owed" reporter:datatype="money"/>
2373                         <field name="id" reporter:datatype="id" />
2374                         <field name="last_billing_note" reporter:datatype="text"/>
2375                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2376                         <field name="last_billing_type" reporter:datatype="text"/>
2377                         <field name="last_payment_note" reporter:datatype="text"/>
2378                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2379                         <field name="last_payment_type" reporter:datatype="text"/>
2380                         <field name="total_owed" reporter:datatype="money"/>
2381                         <field name="total_paid" reporter:datatype="money"/>
2382                         <field name="usr" reporter:datatype="link"/>
2383                         <field name="xact_finish" reporter:datatype="timestamp" />
2384                         <field name="xact_start" reporter:datatype="timestamp" />
2385                         <field name="xact_type" reporter:datatype="text"/>
2386                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2387                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2388                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2389                         <field name="billing_location" reporter:datatype="link"/>
2390                 </fields>
2391                 <links>
2392                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2393                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2394                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2395                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2396                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2397                 </links>
2398         </class>
2399         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2400                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2401                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2402                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2403                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2404                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2405                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2406                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2407                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2408                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2409                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2410                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2411                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2412                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2413                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2414                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2415                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2416                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2417                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2418                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2419                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2420                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2421                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2422                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2423                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2424                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2425                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2426                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2427                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2428                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2429                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2430                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2431                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2432                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2433                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2434                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2435                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2436                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2437                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2438                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2439                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2440                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2441                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2442                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2443                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2444                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2445                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2446                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2447                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2448                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2449                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2450                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2451                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2452                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2453                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2454                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2455                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2456                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2457                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2458                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2459                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2460                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2461                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2462                 </fields>
2463                 <links>
2464                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2465                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2466                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2467                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2468                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2469                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2470                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2471                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2472                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2473                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2474                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2475                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2476                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2477                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2478                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2479                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2480                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2481                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2482                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2483                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2484                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2485                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2486                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2487                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2488                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2489                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2490                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2491                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2492                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2493                 </links>
2494         </class>
2495
2496         <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">
2497                 <fields oils_persist:primary="name">
2498                         <field name="name" reporter:datatype="text"/>
2499                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2500                 </fields>
2501                 <links/>
2502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2503                         <actions>
2504                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2505                                 <retrieve/>
2506                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2507                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2508                         </actions>
2509                 </permacrud>
2510         </class>
2511         <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">
2512                 <fields oils_persist:primary="name">
2513                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2514                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2515                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2516                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2517                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2518                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2519                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2520                 </fields>
2521                 <links>
2522                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2523                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2524                 </links>
2525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2526                         <actions>
2527                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2528                                 <retrieve/>
2529                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2530                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2531                         </actions>
2532                 </permacrud>
2533         </class>
2534         <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">
2535                 <fields oils_persist:primary="name">
2536                         <field name="name" reporter:datatype="text"/>
2537                         <field name="label" reporter:datatype="text"/>
2538                         <field name="description" reporter:datatype="text"/>
2539                         <field name="datatype" reporter:datatype="text"/>
2540                         <field name="view_perm" reporter:datatype="link"/>
2541                         <field name="update_perm" reporter:datatype="link"/>
2542                         <field name="fm_class" reporter:datatype="text"/>
2543                         <field name="grp" reporter:datatype="link"/>
2544                 </fields>
2545                 <links>
2546                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2547                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2548                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2549                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2550                 </links>
2551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2552                         <actions>
2553                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2554                                 <retrieve/>
2555                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2556                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2557                         </actions>
2558                 </permacrud>
2559         </class>
2560         <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">
2561                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2562                         <field name="id" />
2563                         <field name="name"  reporter:datatype="text"/>
2564                         <field name="org_unit" reporter:datatype="org_unit"/>
2565                         <field name="value"  reporter:datatype="text"/>
2566                 </fields>
2567                 <links>
2568                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2569                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2570                 </links>
2571         </class>
2572         <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">
2573                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2574                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2575                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2576                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2577                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2578                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2579                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2580                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2581                 </fields>
2582                 <links>
2583                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2584                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2585                 </links>
2586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2587             <actions>
2588                 <create permission="CREATE_COPY_NOTE">
2589                     <context link="owning_copy" field="circ_lib"/>
2590                 </create>
2591                 <retrieve permission="VIEW_COPY_NOTES">
2592                     <context link="owning_copy" field="circ_lib"/>
2593                 </retrieve>
2594                 <update permission="UPDATE_COPY_NOTE">
2595                     <context link="owning_copy" field="circ_lib"/>
2596                 </update>
2597                 <delete permission="DELETE_COPY_NOTE">
2598                     <context link="owning_copy" field="circ_lib"/>
2599                 </delete>
2600             </actions>
2601         </permacrud>
2602         </class>
2603         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2604                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2605                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2606                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2607                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2608                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2609                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2610                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2611                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2612                 </fields>
2613                 <links>
2614                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2615                 </links>
2616         </class>
2617         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2618                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2619                         <field name="fingerprint"  reporter:datatype="text"/>
2620                         <field name="id" reporter:datatype="id" />
2621                         <field name="master_record" reporter:datatype="link"/>
2622                         <field name="mods"  reporter:datatype="text"/>
2623                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2624                 </fields>
2625                 <links>
2626                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2627                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2628                 </links>
2629         </class>
2630         <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">
2631                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2632                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2633                         <field name="name"  reporter:datatype="text"/>
2634                 </fields>
2635                 <links/>
2636         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2637             <actions>
2638                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2639                 <retrieve/>
2640                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2641                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2642             </actions>
2643         </permacrud>
2644         </class>
2645         <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">
2646                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2647                         <field name="code"  reporter:datatype="text"/>
2648                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2649                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2650                 </fields>
2651                 <links/>
2652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2653             <actions>
2654                 <create permission="CREATE_PERM" global_required="true"/>
2655                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2656                 <update permission="UPDATE_PERM" global_required="true"/>
2657                 <delete permission="DELETE_PERM" global_required="true"/>
2658             </actions>
2659         </permacrud>
2660         </class>
2661         <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">
2662                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2663                         <field name="id" reporter:datatype="id" />
2664                         <field name="metarecord" reporter:datatype="link"/>
2665                         <field name="source" reporter:datatype="link"/>
2666                 </fields>
2667                 <links>
2668                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2669                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2670                 </links>
2671         </class>
2672         <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">
2673                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2674                         <field name="id" reporter:datatype="id" />
2675                         <field name="field" reporter:datatype="link"/>
2676                         <field name="source" reporter:datatype="link"/>
2677                         <field name="value"  reporter:datatype="text"/>
2678                 </fields>
2679                 <links>
2680                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2681                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2682                 </links>
2683         </class>
2684         <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">
2685                 <oils_persist:source_definition>
2686                         SELECT * FROM metabib.author_field_entry
2687                                                 UNION ALL
2688                         SELECT * FROM metabib.keyword_field_entry
2689                                                 UNION ALL
2690                         SELECT * FROM metabib.identifier_field_entry
2691                                                 UNION ALL
2692                         SELECT * FROM metabib.title_field_entry
2693                                                 UNION ALL
2694                         SELECT * FROM metabib.subject_field_entry
2695                                                 UNION ALL
2696                         SELECT * FROM metabib.series_field_entry
2697                 </oils_persist:source_definition>
2698                 <fields>
2699                         <field name="field" reporter:datatype="link"/>
2700                         <field name="id" reporter:datatype="id" />
2701                         <field name="source" reporter:datatype="link"/>
2702                         <field name="value"  reporter:datatype="text"/>
2703                 </fields>
2704                 <links>
2705                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2706                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2707                 </links>
2708         </class>
2709         <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">
2710                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2711                         <field name="field" reporter:datatype="link"/>
2712                         <field name="id" reporter:datatype="id" />
2713                         <field name="source" reporter:datatype="link"/>
2714                         <field name="value"  reporter:datatype="text"/>
2715                 </fields>
2716                 <links>
2717                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2718                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2719                 </links>
2720         </class>
2721         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2722                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2723                         <field name="accepting_usr" reporter:datatype="link"/>
2724                         <field name="amount" reporter:datatype="money" />
2725                         <field name="amount_collected" reporter:datatype="money" />
2726                         <field name="cash_drawer" reporter:datatype="link"/>
2727                         <field name="id" reporter:datatype="id" />
2728                         <field name="note"  reporter:datatype="text"/>
2729                         <field name="payment_ts" reporter:datatype="timestamp"/>
2730                         <field name="xact" reporter:datatype="link"/>
2731                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2732                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2733                 </fields>
2734                 <links>
2735                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2736                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2737                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2738                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2739                 </links>
2740         </class>
2741         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2743                         <field name="accepting_usr" reporter:datatype="link"/>
2744                         <field name="amount" reporter:datatype="money" />
2745                         <field name="amount_collected" reporter:datatype="money" />
2746                         <field name="id" reporter:datatype="id" />
2747                         <field name="note"  reporter:datatype="text"/>
2748                         <field name="payment_ts" reporter:datatype="timestamp"/>
2749                         <field name="xact" reporter:datatype="link"/>
2750                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2751                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2752                 </fields>
2753                 <links>
2754                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2755                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2756                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2757                 </links>
2758         </class>
2759         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2760                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2761                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2762                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2763                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2764                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2765                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2766                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2767                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2768                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2769                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2770                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2771                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2772                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2773                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2774                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2775                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2776                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2777                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2778                 </fields>
2779                 <links>
2780                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2781                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2782                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2783                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2784                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2785                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2786                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2787                 </links>
2788         </class>
2789
2790         <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">
2791                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2792                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2793                         <field name="name"  reporter:datatype="text"/>
2794                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2795                         <field name="block_list" reporter:datatype="text"/>
2796                         <field name="org_depth" reporter:datatype="int"/>
2797                 </fields>
2798                 <links/>
2799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2800             <actions>
2801                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2802                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2803                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2804                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2805             </actions>
2806         </permacrud>
2807         </class>
2808         <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">
2809                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2810                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2811                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2812                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2813                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2814                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2815                 </fields>
2816                 <links>
2817                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2818                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2819                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2820         </links>
2821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2822             <actions>
2823                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2824                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2825                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2826                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2827             </actions>
2828         </permacrud>
2829         </class>
2830         <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">
2831                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2832                         <field name="holdable" reporter:datatype="bool"/>
2833                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2834                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2835                         <field name="opac_visible" reporter:datatype="bool"/>
2836             <field name="copy_active" reporter:datatype="bool"/>
2837                 </fields>
2838                 <links/>
2839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2840             <actions>
2841                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2842                 <retrieve/>
2843                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2844                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2845             </actions>
2846         </permacrud>
2847         </class>
2848         <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">
2849                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2850                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2851                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2852                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2853                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2854                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2855                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2856                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2857                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2858                 </fields>
2859                 <links>
2860                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2861                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2862                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2863                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2864                 </links>
2865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2866                         <actions>
2867                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2868                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2869                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2870                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2871                         </actions>
2872                 </permacrud>
2873         </class>
2874         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2875                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2876                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2877                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2878                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2879                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2880                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2881                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2882                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2883                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2884                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2885                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2886                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2887                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2888                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2889                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2890                 </fields>
2891                 <links>
2892                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2893                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2894                 </links>
2895         </class>
2896
2897         <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">
2898                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2899                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2900                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2901                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2902                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2903                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2904                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2905                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2906                 </fields>
2907                 <links>
2908                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2909                 </links>
2910         </class>
2911
2912         <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">
2913                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2914                         <field name="call_number" />
2915                         <field name="create_date" reporter:datatype="timestamp"/>
2916                         <field name="creator" reporter:datatype="link"/>
2917                         <field name="id" reporter:datatype="id" />
2918                         <field name="pub" reporter:datatype="bool"/>
2919                         <field name="title"  reporter:datatype="text"/>
2920                         <field name="value"  reporter:datatype="text"/>
2921                 </fields>
2922                 <links>
2923                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2924                 </links>
2925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2926             <actions>
2927                 <create permission="CREATE_VOLUME_NOTE">
2928                     <context link="call_number" field="owning_lib"/>
2929                 </create>
2930                 <retrieve permission="VIEW_VOLUME_NOTES">
2931                     <context link="call_number" field="owning_lib"/>
2932                 </retrieve>
2933                 <update permission="UPDATE_VOLUME_NOTE">
2934                     <context link="call_number" field="owning_lib"/>
2935                 </update>
2936                 <delete permission="DELETE_VOLUME_NOTE">
2937                     <context link="call_number" field="owning_lib"/>
2938                 </delete>
2939             </actions>
2940         </permacrud>
2941         </class>
2942         <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">
2943                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2944                         <field name="create_date" reporter:datatype="timestamp"/>
2945                         <field name="creator" reporter:datatype="link"/>
2946                         <field name="edit_date" reporter:datatype="timestamp"/>
2947                         <field name="editor" reporter:datatype="link"/>
2948                         <field name="id" reporter:datatype="id" />
2949                         <field name="record" reporter:datatype="link"/>
2950                         <field name="value" reporter:datatype="text"/>
2951                 </fields>
2952                 <links>
2953                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2954                 </links>
2955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2956             <actions>
2957                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2958                 <retrieve/>
2959                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2960                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2961             </actions>
2962         </permacrud>
2963         </class>
2964         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2965         <oils_persist:source_definition>
2966 SELECT  usr,
2967         SUM(
2968             CASE
2969                 WHEN (
2970                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2971                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2972                 ) THEN 1
2973                 ELSE 0
2974             END
2975         ) AS out,
2976
2977         SUM(
2978             CASE
2979                 WHEN (
2980                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2981                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2982                 ) THEN 1
2983                 ELSE 0
2984             END
2985         ) AS overdue,
2986
2987         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2988         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2989         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2990   FROM  action.circulation
2991   WHERE checkin_time IS NULL
2992   GROUP BY 1
2993         </oils_persist:source_definition>
2994         <fields oils_persist:primary="usr">
2995             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2996             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2997             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2998             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2999             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3000             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3001         </fields>
3002         <links>
3003             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3004         </links>
3005         </class>
3006         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3007         <oils_persist:source_definition>
3008 SELECT  usr,
3009         ARRAY_TO_STRING(ARRAY_ACCUM(
3010             CASE
3011                 WHEN (
3012                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3013                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3014                 ) THEN id
3015                 ELSE 0
3016             END
3017         ),',') AS out,
3018
3019         ARRAY_TO_STRING(ARRAY_ACCUM(
3020             CASE
3021                 WHEN (
3022                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3023                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3024                 ) THEN id
3025                 ELSE 0
3026             END
3027         ),',') AS overdue,
3028
3029         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3030         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3031         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3032   FROM  action.circulation
3033   WHERE checkin_time IS NULL
3034   GROUP BY 1
3035         </oils_persist:source_definition>
3036         <fields oils_persist:primary="usr">
3037             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3038             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3039             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3040             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3041             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3042             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3043         </fields>
3044         <links>
3045             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3046         </links>
3047         </class>
3048         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3049                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3050                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3051                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3052                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3053                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3054                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3055                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3056                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3057                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3058                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3059                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3060                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3061                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3062                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3063                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3064                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3065                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3066                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3067                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3068                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3069                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3070                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3071                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3072                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3073                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3074                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3075                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3076                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3077                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3078                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3079                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3080                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3084                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3085                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3086                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3087                 </fields>
3088                 <links>
3089                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3090                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3091                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3092                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3093                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3094                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3095                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3096                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3097                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3098                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3099                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3100                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3101                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3102                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3103                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3104                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3105                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3106                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3107                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3108                 </links>
3109         </class>
3110         <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">
3111                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3112                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3113                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3114                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3115                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3116                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3117                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3118                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3119                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3120                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3121                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3122                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3123                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3124                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3125                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3126                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3127                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3128                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3129                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3130                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3131                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3132                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3133                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3134                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3135                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3136                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3137                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3138                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3139                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3140                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3141                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3142                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3143                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3144                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3145                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3146                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3147                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3148                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3149                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3150                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3151                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3152                 </fields>
3153                 <links>
3154                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3155                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3156                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3157                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3158                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3159                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3160                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3161                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3162                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3163                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3164                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3165                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3166                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3167                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3168                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3169                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3170                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3171                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3172                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3173                 </links>
3174         </class>
3175         <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">
3176                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3177                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3178                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3179                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3180                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3181                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3182                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3183                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3184                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3185                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3186                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3187                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3188                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3189                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3190                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3191                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3192                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3193                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3194                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3195                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3196                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3197                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3198                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3199                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3200                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3201                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3202                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3203                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3204                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3205                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3206                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3207                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3208                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3209                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3210                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3211                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3212                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3213                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3214                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3215                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3216                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3217                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3218                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3219                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3220                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3221                 </fields>
3222                 <links>
3223                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3224                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3225                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3226                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3227                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3228                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3229                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3230                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3231                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3232                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3233                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3234                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3235                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3236                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3237                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3238                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3239                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3240                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3241                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3242                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3243                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3244                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3245                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3246                 </links>
3247         </class>
3248
3249         <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">
3250                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3251                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3252                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3253                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3254                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3255                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3256                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3257                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3258                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3259                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3260                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3261                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3262                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3263                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3264                 </fields>
3265                 <links>
3266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3267                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3268                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3269                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3270                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3271                 </links>
3272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3273                         <actions>
3274                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3275                                 <retrieve />
3276                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3277                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3278                         </actions>
3279                 </permacrud>
3280         </class>
3281
3282         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3283                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3284                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3285                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3286                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3287                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3289                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3290                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3291                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3292                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3293                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3294                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3295                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3296                 </fields>
3297                 <links>
3298                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3299                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3300                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3301                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3302                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3303                 </links>
3304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3305                         <actions>
3306                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3307                                 <retrieve />
3308                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3309                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3310                         </actions>
3311                 </permacrud>
3312         </class>
3313         
3314         <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">
3315                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3316                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3317                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3318                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3319                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3320                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3321                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3322                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3323                 </fields>
3324                 <links>
3325                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3326                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3327                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3328                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3329                 </links>
3330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3331                         <actions>
3332                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3333                                 <retrieve />
3334                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3335                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3336                         </actions>
3337                 </permacrud>
3338         </class>
3339         
3340         <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">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3342                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3343                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3344                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3345                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3346                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3347                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3348                 </fields>
3349                 <links>
3350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3351                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3352                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3353                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3354                 </links>
3355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3356                         <actions>
3357                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3358                                 <retrieve />
3359                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3360                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3361                         </actions>
3362                 </permacrud>
3363         </class>
3364         
3365         <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">
3366                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3367                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3368                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3369                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3370                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3371                 </fields>
3372                 <links>
3373                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3374                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3375                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3376                 </links>
3377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3378                         <actions>
3379                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3380                                 <retrieve />
3381                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3382                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3383                         </actions>
3384                 </permacrud>
3385         </class>
3386         
3387         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3388                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3389                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3390                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3391                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3392                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3393                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3394                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3395                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3396                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3397                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3398                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3399                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3400                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3401                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3402                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3403                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3404                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3405                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3406                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3407                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3408                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3409                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3410                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3411                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3412                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3413                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3414                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3415                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3416                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3417                 </fields>
3418                 <links>
3419                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3420                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3421                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3422                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3423                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3424                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3425                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3426                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3427                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3428                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3429                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3430                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3431                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3432                 </links>
3433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3434                         <actions>
3435                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3436                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3437                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3438                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3439                         </actions>
3440                 </permacrud>
3441         </class>
3442         
3443         <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">
3444                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3445                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3446                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3447                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3448                 </fields>
3449                 <links>
3450                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3451                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3452                 </links>
3453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3454                         <actions>
3455                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3456                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3457                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3458                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3459                         </actions>
3460                 </permacrud>
3461         </class>
3462
3463         <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">
3464                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3465                         <field name="bucket" reporter:datatype="link"/>
3466                         <field name="id" reporter:datatype="id" />
3467                         <field name="target_call_number" reporter:datatype="link" />
3468                         <field name="create_time" reporter:datatype="timestamp" />
3469                         <field name="pos" reporter:datatype="int" />
3470                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3471                 </fields>
3472                 <links>
3473                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3474                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3475             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3476                 </links>
3477         </class>
3478         <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">
3479                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3480                         <field name="id" reporter:datatype="id" />
3481                         <field name="item" reporter:datatype="link"/>
3482                         <field name="note" reporter:datatype="text" />
3483                 </fields>
3484                 <links>
3485                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3486                 </links>
3487         </class>
3488         <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">
3489                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3490                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3491                         <field name="btype" reporter:datatype="text"/>
3492                         <field name="id" reporter:datatype="id" />
3493                         <field name="name" reporter:datatype="text"/>
3494                         <field name="owner" reporter:datatype="link"/>
3495                         <field name="pub" reporter:datatype="bool"/>
3496                         <field name="create_time" reporter:datatype="timestamp" />
3497                 </fields>
3498                 <links>
3499                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3500                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3501                 </links>
3502         </class>
3503         <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">
3504                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3505                         <field name="id" reporter:datatype="id" />
3506                         <field name="bucket" reporter:datatype="link"/>
3507                         <field name="note" reporter:datatype="text" />
3508                 </fields>
3509                 <links>
3510                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3511                 </links>
3512         </class>
3513         <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">
3514                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3515                         <field name="hold" reporter:datatype="link"/>
3516                         <field name="id" reporter:datatype="id" />
3517                         <field name="target_copy" reporter:datatype="link"/>
3518                 </fields>
3519                 <links>
3520                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3521                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3522                 </links>
3523         </class>
3524         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3526                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3527                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3528                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3529                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3530                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3531                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3532                 </fields>
3533                 <links>
3534                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3535                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3536                 </links>
3537         </class>
3538         <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">
3539                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3540                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3541                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3542                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3543                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3544                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3545                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3546                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3547                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3548                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3549                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3550                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3551                 </fields>
3552                 <links>
3553                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3554                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3555                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3556                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3557                 </links>
3558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3559             <actions>
3560                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3561                 <retrieve/>
3562                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3563                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3564             </actions>
3565         </permacrud>
3566         </class>
3567
3568     <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">
3569         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3570             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3571             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3572             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3573             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3574         </fields>
3575         <links>
3576             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3577             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3578         </links>
3579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3580             <actions>
3581                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3582                 <retrieve/>
3583                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3584                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3585             </actions>
3586         </permacrud>
3587     </class>
3588
3589         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3590                 <fields>
3591                         <field name="sre_id" oils_persist:virtual="true" />
3592                         <field name="location" oils_persist:virtual="true" />
3593                         <field name="owning_lib" oils_persist:virtual="true" />
3594                         <field name="basic_holdings" oils_persist:virtual="true" />
3595                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3596                         <field name="supplement_holdings" oils_persist:virtual="true" />
3597                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3598                         <field name="index_holdings" oils_persist:virtual="true" />
3599                         <field name="index_holdings_add" oils_persist:virtual="true" />
3600                         <field name="online" oils_persist:virtual="true" />
3601                         <field name="missing" oils_persist:virtual="true" />
3602                         <field name="incomplete" oils_persist:virtual="true" />
3603                 </fields>
3604         </class>
3605
3606         <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">
3607                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3608                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3609                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3610                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3611                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3612                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3613                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3614                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3615                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3616                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3617                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3618                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3619                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3620                 </fields>
3621                 <links>
3622                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3623                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3624                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3625                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3626                 </links>
3627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3628                         <actions>
3629                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3630                                 <retrieve/>
3631                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3632                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3633                         </actions>
3634                 </permacrud>
3635         </class>
3636
3637         <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">
3638                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3639                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3640                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3641                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3642                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3643                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3644                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3645                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3646                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3647                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3648                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3649                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3650                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3651                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3652                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3653                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3654                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3655                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3656                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3657                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3658                 </fields>
3659                 <links>
3660                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3661                 </links>
3662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3663                         <actions>
3664                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3665                                         <context link="subscription" field="owning_lib" />
3666                                 </create>
3667                                 <retrieve />
3668                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3669                                         <context link="subscription" field="owning_lib" />
3670                                 </update>
3671                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3672                                         <context link="subscription" field="owning_lib" />
3673                                 </delete>
3674                         </actions>
3675                 </permacrud>
3676         </class>
3677
3678         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3680                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3681                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3682                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3683                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3684                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3685                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3686                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3687                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3688                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3689                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3690                 </fields>
3691                 <links>
3692                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3693                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3694                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3695                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3696                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3697                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3698                 </links>
3699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3700                         <actions>
3701                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3702                                 <retrieve />
3703                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3704                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3705                         </actions>
3706                 </permacrud>
3707         </class>
3708
3709         <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">
3710                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3711                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3712                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3713                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3714                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3715                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3716                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3717                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3718                 </fields>
3719                 <links>
3720                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3722                 </links>
3723                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3724                 </permacrud>
3725         </class>
3726
3727         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3728                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3729                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3730                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3731                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3732                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3733                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3734                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3735                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3736                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3737                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3738                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3739                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3740                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3741                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3742                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3743                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3744                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3745                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3746                 </fields>
3747                 <links>
3748                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3749                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3750                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3751                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3752                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3753                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3754                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3755                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3756                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3757                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3758                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3759                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3760                 </links>
3761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3762                         <actions>
3763                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3764                                 <retrieve />
3765                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3766                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3767                         </actions>
3768                 </permacrud>
3769         </class>
3770
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3774                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3775                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3776                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3777                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3778                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3779                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3780                 </fields>
3781                 <links>
3782                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3783                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3784                 </links>
3785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3786                         <actions>
3787                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3788                                         <context link="distribution" field="holding_lib" />
3789                                 </create>
3790                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3791                                         <context link="distribution" field="holding_lib" />
3792                                 </retrieve>
3793                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3794                                         <context link="distribution" field="holding_lib" />
3795                                 </update>
3796                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3797                                         <context link="distribution" field="holding_lib" />
3798                                 </delete>
3799                         </actions>
3800                 </permacrud>
3801         </class>
3802
3803         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3804                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3805                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3806                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3807                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3808                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3809                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3810                 </fields>
3811                 <links>
3812                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3813                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3814                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3815                 </links>
3816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3817                         <actions>
3818                                 <create permission="ADMIN_SERIAL_STREAM">
3819                                         <context link="distribution" field="holding_lib" />
3820                                 </create>
3821                                 <retrieve />
3822                                 <update permission="ADMIN_SERIAL_STREAM">
3823                                         <context link="distribution" field="holding_lib" />
3824                                 </update>
3825                                 <delete permission="ADMIN_SERIAL_STREAM">
3826                                         <context link="distribution" field="holding_lib" />
3827                                 </delete>
3828                         </actions>
3829                 </permacrud>
3830         </class>
3831
3832         <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">
3833                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3834                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3835                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3836                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3837                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3838                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3839                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3840                 </fields>
3841                 <links>
3842                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3843                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3844                 </links>
3845                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3846                         <actions>
3847                                 <create permission="ADMIN_SERIAL_STREAM">
3848                                         <context link="stream" jump="distribution" field="holding_lib" />
3849                                 </create>
3850                                 <retrieve permission="RECEIVE_SERIAL">
3851                                         <context link="stream" jump="distribution" field="holding_lib" />
3852                                 </retrieve>
3853                                 <update permission="ADMIN_SERIAL_STREAM">
3854                                         <context link="stream" jump="distribution" field="holding_lib" />
3855                                 </update>
3856                                 <delete permission="ADMIN_SERIAL_STREAM">
3857                                         <context link="stream" jump="distribution" field="holding_lib" />
3858                                 </delete>
3859                         </actions>
3860                 </permacrud>
3861         </class>
3862
3863         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3864                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3865                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3866                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3867                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3868                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3869                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3870                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3871                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3872                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3873                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3874                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3875                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3876                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3877                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3878                 </fields>
3879                 <links>
3880                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3881                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3882                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3883                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3884                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3885                 </links>
3886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3887                         <actions>
3888                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3889                                         <context link="subscription" field="owning_lib" />
3890                                 </create>
3891                                 <retrieve/>
3892                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3893                                         <context link="subscription" field="owning_lib" />
3894                                 </update>
3895                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3896                                         <context link="subscription" field="owning_lib" />
3897                                 </delete>
3898                         </actions>
3899                 </permacrud>
3900         </class>
3901
3902         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3903                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3904                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3905                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3906                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3907                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3908                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3909                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3910                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3911                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3912                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3913                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3914                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3915                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
3916                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3917                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3918                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3919                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3920                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3921                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3922                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3923                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3924                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3925                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3926                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3927                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3928                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3929                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3930                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3931                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3932                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3933                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3934                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3935                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3936                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3937                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3938                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3939                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3940                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3941                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3942                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3943                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3944                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3945                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3946                 </fields>
3947                 <links>
3948                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3949                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3950                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3951                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3952                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3953                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3954                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3955                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3956                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3957                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3958                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3959                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3960                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3961                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3962                 </links>
3963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3964                         <actions>
3965                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3966                                 <retrieve/>
3967                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3968                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3969                         </actions>
3970                 </permacrud>
3971         </class>
3972
3973         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3974                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3975                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3976                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3977                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3978                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3979                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3980                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3981                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3982                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3983                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3984                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3985                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3986                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3987                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3988                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3989                 </fields>
3990                 <links>
3991                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3992                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3993                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3994                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3995                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3996                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3997                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3998                 </links>
3999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4000                         <actions>
4001                                 <create permission="ADMIN_SERIAL_ITEM">
4002                                         <context link="stream" jump="distribution" field="holding_lib" />
4003                                 </create>
4004                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4005                                         <context link="stream" jump="distribution" field="holding_lib" />
4006                                 </retrieve>
4007                                 <update permission="ADMIN_SERIAL_ITEM">
4008                                         <context link="stream" jump="distribution" field="holding_lib" />
4009                                 </update>
4010                                 <delete permission="ADMIN_SERIAL_ITEM">
4011                                         <context link="stream" jump="distribution" field="holding_lib" />
4012                                 </delete>
4013                         </actions>
4014                 </permacrud>
4015         </class>
4016
4017         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4018                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4019                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4020                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4021                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4022                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4023                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4024                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4025                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4026                 </fields>
4027                 <links>
4028                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4029                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4030                 </links>
4031                 <!-- Not available via PCRUD at this time -->
4032         </class>
4033
4034         <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">
4035                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4036                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4037                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4038                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4039                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4040                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4041                 </fields>
4042                 <links>
4043                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4044                 </links>
4045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4046                         <actions>
4047                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4048                                         <context link="distribution" field="holding_lib" />
4049                                 </create>
4050                                 <retrieve/>
4051                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4052                                         <context link="distribution" field="holding_lib" />
4053                                 </update>
4054                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4055                                         <context link="distribution" field="holding_lib" />
4056                                 </create>
4057                         </actions>
4058                 </permacrud>
4059         </class>
4060
4061         <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">
4062                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4063                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4064                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4065                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4066                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4067                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4068                 </fields>
4069                 <links>
4070                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4071                 </links>
4072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4073                         <actions>
4074                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4075                                         <context link="distribution" field="holding_lib" />
4076                                 </create>
4077                                 <retrieve/>
4078                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4079                                         <context link="distribution" field="holding_lib" />
4080                                 </update>
4081                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4082                                         <context link="distribution" field="holding_lib" />
4083                                 </create>
4084                         </actions>
4085                 </permacrud>
4086         </class>
4087
4088         <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">
4089                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4090                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4091                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4092                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4093                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4094                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4095                 </fields>
4096                 <links>
4097                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4098                 </links>
4099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4100                         <actions>
4101                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4102                                         <context link="distribution" field="holding_lib" />
4103                                 </create>
4104                                 <retrieve/>
4105                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4106                                         <context link="distribution" field="holding_lib" />
4107                                 </update>
4108                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4109                                         <context link="distribution" field="holding_lib" />
4110                                 </create>
4111                         </actions>
4112                 </permacrud>
4113         </class>
4114
4115         <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">
4116                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4117                         <field name="id" reporter:datatype="id" />
4118                         <field name="owning_copy" reporter:datatype="link"/>
4119                         <field name="stat_cat" reporter:datatype="link"/>
4120                         <field name="stat_cat_entry" reporter:datatype="link"/>
4121                 </fields>
4122                 <links>
4123                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4124                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4125                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4126                 </links>
4127         </class>
4128         <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">
4129                 <fields oils_persist:primary="code">
4130                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4131                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4132                 </fields>
4133                 <links/>
4134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4135             <actions>
4136                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4137                 <retrieve/>
4138                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4139                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4140             </actions>
4141         </permacrud>
4142         </class>
4143         <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">
4144                 <fields oils_persist:primary="code">
4145                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4146                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4147                 </fields>
4148                 <links/>
4149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4150             <actions>
4151                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4152                 <retrieve/>
4153                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4154                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4155             </actions>
4156         </permacrud>
4157         </class>
4158         <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">
4159                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4160                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4161                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4162                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4163                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4164                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4165                 </fields>
4166                 <links>
4167             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4168         </links>
4169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4170             <actions>
4171                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4172                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4173                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4174                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4175             </actions>
4176         </permacrud>
4177         </class>
4178         <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">
4179                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4180                         <field name="id" reporter:datatype="id" />
4181                         <field name="name" reporter:datatype="text"/>
4182                 </fields>
4183                 <links/>
4184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4185             <actions>
4186                 <create permission="CREATE_LASSO" global_required="true"/>
4187                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4188                 <update permission="UPDATE_LASSO" global_required="true"/>
4189                 <delete permission="DELETE_LASSO" global_required="true"/>
4190             </actions>
4191         </permacrud>
4192         </class>
4193         <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">
4194                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4195                         <field name="id" reporter:datatype="id" />
4196                         <field name="lasso" reporter:datatype="link"/>
4197                         <field name="org_unit" reporter:datatype="org_unit"/>
4198                 </fields>
4199                 <links>
4200                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4201                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4202                 </links>
4203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4204             <actions>
4205                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4206                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4207                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4208                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4209             </actions>
4210         </permacrud>
4211         </class>
4212         <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">
4213                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4214                         <field name="id" reporter:datatype="id" />
4215                         <field name="from_org" reporter:datatype="org_unit"/>
4216                         <field name="to_org" reporter:datatype="org_unit"/>
4217                         <field name="prox" reporter:datatype="int" />
4218                 </fields>
4219                 <links>
4220                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4221                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4222                 </links>
4223         </class>
4224         <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">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4226                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4227                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4228                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4229                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4230                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4231                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4232                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4233                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4234                 </fields>
4235                 <links/>
4236         </class>
4237         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4238                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4239                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4240                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4241                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4242                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4243                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4244                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4245                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4246                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4247                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4248                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4249                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4250                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4251                 </fields>
4252                 <links>
4253                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4254                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4255                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4256                 </links>
4257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4258             <actions>
4259                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4260                 <retrieve/>
4261                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4262                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4263             </actions>
4264         </permacrud>
4265         </class>
4266         <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">
4267                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4268                         <field name="address_type"  reporter:datatype="text"/>
4269                         <field name="city"  reporter:datatype="text"/>
4270                         <field name="country"  reporter:datatype="text"/>
4271                         <field name="county"  reporter:datatype="text"/>
4272                         <field name="id" reporter:datatype="id" />
4273                         <field name="org_unit" reporter:datatype="org_unit"/>
4274                         <field name="post_code"  reporter:datatype="text"/>
4275                         <field name="state"  reporter:datatype="text"/>
4276                         <field name="street1"  reporter:datatype="text"/>
4277                         <field name="street2"  reporter:datatype="text"/>
4278                         <field name="valid" reporter:datatype="bool"/>
4279                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4280                 </fields>
4281                 <links>
4282                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4283                 </links>
4284         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4285             <actions>
4286                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4287                 <retrieve/>
4288                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4289                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4290             </actions>
4291         </permacrud>
4292         </class>
4293         <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">
4294                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4295                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4296                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4297                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4298                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4299                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4300                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4301                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4302                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4303                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4304                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4305                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4306                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4307                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4308                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4309                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4310                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4311                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4312                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4313                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4314                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4315                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4316                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4317                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4318                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4319                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4320                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4321                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4322                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4323                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4324                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4325                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4326                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4327                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4328                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4329                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4330                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4331                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4332                 </fields>
4333                 <links>
4334                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4335                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4336                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4337                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4338                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4339                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4340                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4341                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4342                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4343                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4344                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4345                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4346                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4347                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4348                 </links>
4349         </class>
4350         <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">
4351                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4352                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4353                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4354                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4355                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4356                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4357                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4358                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4359                 </fields>
4360                 <links>
4361                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4362                 </links>
4363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4364                         <actions>
4365                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4366                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4367                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4368                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4369                         </actions>
4370                 </permacrud>
4371         </class>
4372         <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">
4373                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4374                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4375                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4376                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4377                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4378                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4379                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4380                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4381                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4382                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4383                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4384                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4385                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4386                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4387                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4388                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4389                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4390                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4391                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4392                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4393                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4394                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4397                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4398                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4399                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4400                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4401                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4402                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4403                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4404                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4405                 </fields>
4406                 <links>
4407                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4408                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4409                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4410                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4411                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4412                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4413                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4414                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4415                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4416                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4417                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4418                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4419                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4420                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4421                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4422                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4423                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4424                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4425                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4426                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4427                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4428                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4429                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4430                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4431                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4432                 </links>
4433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4434             <actions>
4435                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4436                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4437                     <context field="id"/>
4438                     <context field="parent_ou"/>
4439                                 </retrieve>
4440                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4441                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4442             </actions>
4443         </permacrud>
4444         </class>
4445         <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">
4446                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4447                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4448                         <field name="btype" reporter:datatype="text"/>
4449                         <field name="id" reporter:datatype="id" />
4450                         <field name="name"  reporter:datatype="text"/>
4451                         <field name="owner" reporter:datatype="link"/>
4452                         <field name="pub" reporter:datatype="bool"/>
4453                         <field name="create_time" reporter:datatype="timestamp" />
4454                 </fields>
4455                 <links>
4456                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4457                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4458                 </links>
4459         </class>
4460         <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">
4461                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4462                         <field name="id" reporter:datatype="id" />
4463                         <field name="bucket" reporter:datatype="link"/>
4464                         <field name="note" reporter:datatype="text" />
4465                 </fields>
4466                 <links>
4467                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4468                 </links>
4469         </class>
4470         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4471                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4472                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4474                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4475                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4476                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4477                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4478                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4479                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4480                 </fields>
4481                 <links>
4482                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4483                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4484                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4485                 </links>
4486         </class>
4487         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4488                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4489                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4490                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4491                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4492                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4493                 </fields>
4494                 <links>
4495                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4496                 </links>
4497         </class>
4498     <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">
4499         <fields oils_persist:primary="field">
4500             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4501             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4502             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4503         </fields>
4504         <links/>
4505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4506             <actions>
4507                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4508                 <retrieve />
4509                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4510                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4511             </actions>
4512         </permacrud>
4513     </class>
4514         <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">
4515                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4516                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4517                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4518                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4519                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4520                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4521                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4522                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4523                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4524                 </fields>
4525                 <links>
4526                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4527                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4528                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4529                 </links>
4530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4531             <actions>
4532                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4533                 <retrieve />
4534                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4535                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4536             </actions>
4537         </permacrud>
4538         </class>
4539         <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">
4540                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4541                         <field name="field" reporter:datatype="link"/>
4542                         <field name="id" reporter:datatype="id" />
4543                         <field name="source" reporter:datatype="link"/>
4544                         <field name="value"  reporter:datatype="text"/>
4545                 </fields>
4546                 <links>
4547                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4548                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4549                 </links>
4550         </class>
4551         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4552                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4553                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field name="btype" reporter:datatype="text"/>
4555                         <field name="id" reporter:datatype="id" />
4556                         <field name="name"  reporter:datatype="text"/>
4557                         <field name="owner" reporter:datatype="link"/>
4558                         <field name="pub" reporter:datatype="bool"/>
4559                         <field name="create_time" reporter:datatype="timestamp" />
4560                 </fields>
4561                 <links>
4562                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4563                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4564                 </links>
4565         </class>
4566         <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">
4567                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4568                         <field name="id" reporter:datatype="id" />
4569                         <field name="bucket" reporter:datatype="link"/>
4570                         <field name="note" reporter:datatype="text" />
4571                 </fields>
4572                 <links>
4573                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4574                 </links>
4575         </class>
4576         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4577                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4578                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4579                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4580                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4581                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4582                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4583                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4584                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4585                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4586                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4587                 </fields>
4588                 <links>
4589                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4590                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4591                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4592                 </links>
4593         </class>
4594         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4595                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4596                         <field name="id" reporter:datatype="id" />
4597                         <field name="ind1" />
4598                         <field name="ind2" />
4599                         <field name="record" />
4600                         <field name="subfield" />
4601                         <field name="tag" />
4602                         <field name="value" />
4603                 </fields>
4604                 <links>
4605                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4606                 </links>
4607         </class>
4608         <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">
4609                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4610                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4611                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4612                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4613                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4614                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4615                 </fields>
4616                 <links>
4617                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4618                 </links>
4619         </class>
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4622                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4623                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4624                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4625                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4626                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4627                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4628                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4629                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4630                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4631                 </fields>
4632                 <links>
4633                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4634                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4635                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4636                 </links>
4637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4638             <actions>
4639                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4640                 <retrieve/>
4641                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4642                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4643             </actions>
4644         </permacrud>
4645         </class>
4646         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4647                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4648                         <field name="create_date" reporter:datatype="timestamp"/>
4649                         <field name="creator" reporter:datatype="link"/>
4650                         <field name="edit_date" reporter:datatype="timestamp"/>
4651                         <field name="editor" reporter:datatype="link"/>
4652                         <field name="id" reporter:datatype="id" />
4653                         <field name="pub" reporter:datatype="bool"/>
4654                         <field name="record" reporter:datatype="link"/>
4655                         <field name="value"  reporter:datatype="text"/>
4656                 </fields>
4657                 <links>
4658                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4659                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4660                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4661                 </links>
4662         </class>
4663         <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">
4664                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4665                         <field name="balance_owed" reporter:datatype="money" />
4666                         <field name="total_owed" reporter:datatype="money" />
4667                         <field name="total_paid" reporter:datatype="money" />
4668                         <field name="usr" reporter:datatype="link"/>
4669                 </fields>
4670                 <links>
4671                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4672                 </links>
4673         </class>
4674         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4675                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4676                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4677                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4678                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4679                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4680                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4681                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4682                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4683                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4684                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4685                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4686                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4687                 </fields>
4688                 <links>
4689                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4690                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4691                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4692                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4693                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4694                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4695                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4696                 </links>
4697         </class>
4698         <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">
4699                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4700                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4701                         <field name="quality" reporter:datatype="int" />
4702                         <field name="source" reporter:datatype="text"/>
4703                         <field name="transcendant" reporter:datatype="bool"/>
4704                 </fields>
4705                 <links/>
4706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4707             <actions>
4708                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4709                 <retrieve/>
4710                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4711                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4712             </actions>
4713         </permacrud>
4714         </class>
4715         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4716                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4717                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4718                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4719                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4720                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4721                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4722                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4723                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4724                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4725                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4726                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4727                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4728                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4729                 </fields>
4730                 <links>
4731                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4732                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4733                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4734                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4735                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4736                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4737                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4738                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4739                 </links>
4740         </class>
4741         <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">
4742                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4743                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4744                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4745                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4746                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4747                 </fields>
4748                 <links>
4749                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4750                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4751                 </links>
4752         </class>
4753         <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">
4754                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4755                         <field name="bucket" reporter:datatype="link"/>
4756                         <field name="id" reporter:datatype="id" />
4757                         <field name="target_user" reporter:datatype="link"/>
4758                         <field name="create_time" reporter:datatype="timestamp" />
4759                         <field name="pos" reporter:datatype="int" />
4760                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4761                 </fields>
4762                 <links>
4763                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4764                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4765             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4766                 </links>
4767         </class>
4768         <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">
4769                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4770                         <field name="id" reporter:datatype="id" />
4771                         <field name="item" reporter:datatype="link"/>
4772                         <field name="note" reporter:datatype="text" />
4773                 </fields>
4774                 <links>
4775                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4776                 </links>
4777         </class>
4778         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4779                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4780                         <field name="balance_owed" reporter:datatype="money" />
4781                         <field name="total_owed" reporter:datatype="money" />
4782                         <field name="total_paid" reporter:datatype="money" />
4783                         <field name="usr" reporter:datatype="link"/>
4784                 </fields>
4785                 <links>
4786                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4787                 </links>
4788         </class>
4789         <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">
4790                 <fields oils_persist:primary="code" oils_persist:sequence="">
4791                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4792                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4793                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4794                 </fields>
4795                 <links/>
4796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4797             <actions>
4798                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4799                 <retrieve/>
4800                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4801                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4802             </actions>
4803         </permacrud>
4804         </class>
4805         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4806                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4807                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4808                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4809                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4810                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4811                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4812                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4813                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4814                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4815                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4816                 </fields>
4817                 <links>
4818                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4819                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4820                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4821                 </links>
4822         </class>
4823         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4824                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4825                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4826                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4827                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4828                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4829                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4830                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4831                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4832                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4833                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4834                 </fields>
4835                 <links>
4836                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4837                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4838                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4839                 </links>
4840         </class>
4841         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4842                 <fields oils_persist:primary="id" oils_persist:sequence="">
4843                         <field name="checkin_lib" reporter:datatype="link"/>
4844                         <field name="checkin_staff" reporter:datatype="link"/>
4845                         <field name="checkin_time" reporter:datatype="timestamp"/>
4846                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4847                         <field name="circ_staff" reporter:datatype="link"/>
4848                         <field name="desk_renewal" reporter:datatype="bool"/>
4849                         <field name="due_date" reporter:datatype="timestamp"/>
4850                         <field name="duration" reporter:datatype="interval"/>
4851                         <field name="duration_rule" reporter:datatype="link"/>
4852                         <field name="fine_interval" reporter:datatype="interval"/>
4853                         <field name="id" reporter:datatype="id" />
4854                         <field name="max_fine" reporter:datatype="money" />
4855                         <field name="max_fine_rule" reporter:datatype="link"/>
4856                         <field name="opac_renewal" reporter:datatype="bool"/>
4857                         <field name="phone_renewal" reporter:datatype="bool"/>
4858                         <field name="recurring_fine" reporter:datatype="money" />
4859                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4860                         <field name="renewal_remaining" reporter:datatype="int" />
4861             <field name="grace_period" reporter:datatype="interval" />
4862                         <field name="stop_fines" reporter:datatype="text"/>
4863                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4864                         <field name="target_copy" reporter:datatype="link"/>
4865                         <field name="usr" reporter:datatype="link"/>
4866                         <field name="xact_finish" reporter:datatype="timestamp" />
4867                         <field name="xact_start" reporter:datatype="timestamp" />
4868                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4869                 </fields>
4870                 <links>
4871                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4872                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4873                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4874                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4875                 </links>
4876         </class>
4877         <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">
4878                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4879                         <field name="field" reporter:datatype="link"/>
4880                         <field name="id" reporter:datatype="id" />
4881                         <field name="source" reporter:datatype="link"/>
4882                         <field name="value" reporter:datatype="text"/>
4883                 </fields>
4884                 <links>
4885                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4886                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4887                 </links>
4888         </class>
4889         <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">
4890                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4891                         <field name="high" reporter:datatype="money" />
4892                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4893                         <field name="low" reporter:datatype="money" />
4894                         <field name="name" reporter:datatype="text"/>
4895                         <field name="normal" reporter:datatype="money" />
4896                         <field name="recurrence_interval" reporter:datatype="interval"/>
4897             <field name="grace_period" reporter:datatype="interval" />
4898                 </fields>
4899                 <links/>
4900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4901             <actions>
4902                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4903                 <retrieve/>
4904                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4905                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4906             </actions>
4907         </permacrud>
4908         </class>
4909         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4910                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4911                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4912                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4913                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4914                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4915                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4916                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4917                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4918                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4919                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4920                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4921                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4922                 </fields>
4923                 <links>
4924                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4925                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4926                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4927                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4928                 </links>
4929         </class>
4930         <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">
4931                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4932                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4933                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4934                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4935                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4936                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4937                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4938                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4939                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4940                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4941                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4942                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4943                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4944                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4945                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4946                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4947                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4948                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4949                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4950                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4951                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4952                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4953                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4954                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4955                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4956                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4957                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4958                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4959                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4960                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4961                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4962                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4963                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4964                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4965                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4966                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4967                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4968                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4969                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4970                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4971                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
4972                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4973                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
4974                 </fields>
4975                 <links>
4976                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4977                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4978                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4979                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4980                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4981                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4982                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4983                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4984                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4985                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4986                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4987                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4988                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4989                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4990                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
4991                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
4992                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
4993                 </links>
4994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4995             <actions>
4996                 <create permission="CREATE_COPY">
4997                     <context link="call_number" field="owning_lib"/>
4998                 </create>
4999                 <retrieve/>
5000                 <update permission="UPDATE_COPY">
5001                     <context link="call_number" field="owning_lib"/>
5002                 </update>
5003                 <delete permission="DELETE_COPY">
5004                     <context link="call_number" field="owning_lib"/>
5005                 </delete>
5006             </actions>
5007         </permacrud>
5008         </class>
5009
5010         <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">
5011                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5012                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5013                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5014                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5015                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5016                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5017                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5018                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5019                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5020                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
5021                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5022                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5023                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5024                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5025                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5026                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5027                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5028                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5029                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5030                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5031                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5032                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5033                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5034                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5035                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5036                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5037                 </fields>
5038                 <links>
5039                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5040                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5041                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5042                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5043                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5044                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5045                 </links>
5046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5047                         <actions>
5048                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5049                                 <retrieve />
5050                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5051                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5052                         </actions>
5053                 </permacrud>
5054         </class>
5055
5056         <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">
5057                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5058                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5059                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5060                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5061                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5062                 </fields>
5063                 <links/>
5064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5065             <actions>
5066                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5067                 <retrieve/>
5068                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5069                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5070             </actions>
5071         </permacrud>
5072         </class>
5073         <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">
5074                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5075                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5076                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5077                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5078                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5079                 </fields>
5080                 <links/>
5081         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5082             <actions>
5083                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5084                 <retrieve/>
5085                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5086                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5087             </actions>
5088         </permacrud>
5089         </class>
5090         <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">
5091                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5092                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5093                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5094                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5095                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5096                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5097                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5098                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5099                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5100                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5101                 </fields>
5102                 <links>
5103                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5104                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5105                 </links>
5106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5107             <actions>
5108                 <create permission="CREATE_PERM" global_required="true"/>
5109                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5110                 <update permission="UPDATE_PERM" global_required="true"/>
5111                 <delete permission="DELETE_PERM" global_required="true"/>
5112             </actions>
5113         </permacrud>
5114         </class>
5115         <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">
5116                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5117                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5118                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5119                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5120                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5121                 </fields>
5122                 <links>
5123                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5124                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5125                 </links>
5126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5127             <actions>
5128                 <create permission="ADMIN_SURVEY">
5129                     <context link="question" jump="survey" field="owner"/>
5130                 </create>
5131                 <retrieve/>
5132                 <update permission="ADMIN_SURVEY">
5133                     <context link="question" jump="survey" field="owner"/>
5134                 </update>
5135                 <delete permission="ADMIN_SURVEY">
5136                     <context link="question" jump="survey" field="owner"/>
5137                 </delete>
5138             </actions>
5139         </permacrud>
5140         </class>
5141         <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">
5142                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5143                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5144                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5145                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5146                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5147                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5148                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5149                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5150                 </fields>
5151                 <links>
5152                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5153                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5154                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5155                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5156                 </links>
5157         </class>
5158         <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">
5159                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5160                         <field name="balance_owed" reporter:datatype="money" />
5161                         <field name="total_owed" reporter:datatype="money" />
5162                         <field name="total_paid" reporter:datatype="money" />
5163                         <field name="usr" reporter:datatype="link"/>
5164                 </fields>
5165                 <links>
5166                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5167                 </links>
5168         </class>
5169         <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">
5170                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5171                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5172                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5173                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5175                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5176                 </fields>
5177                 <links>
5178                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5179                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5180                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5181                 </links>
5182         </class>
5183         <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">
5184                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5185                         <field name="field" reporter:datatype="link"/>
5186                         <field name="id" reporter:datatype="id" />
5187                         <field name="source" reporter:datatype="link"/>
5188                         <field name="value" reporter:datatype="text"/>
5189                 </fields>
5190                 <links>
5191                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5192                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5193                 </links>
5194         </class>
5195         <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">
5196                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5197                         <field name="field" reporter:datatype="link"/>
5198                         <field name="id" reporter:datatype="id" />
5199                         <field name="source" reporter:datatype="link"/>
5200                         <field name="value" reporter:datatype="text"/>
5201                 </fields>
5202                 <links>
5203                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5204                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5205                 </links>
5206         </class>
5207         <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">
5208                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5209                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5210                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5211                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5212                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5213                 </fields>
5214                 <links>
5215                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5216                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5217                 </links>
5218         </class>
5219         <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">
5220                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5221                         <field name="depth" reporter:datatype="int" />
5222                         <field name="grantable" reporter:datatype="bool"/>
5223                         <field name="grp" reporter:datatype="link"/>
5224                         <field name="id" reporter:datatype="id" />
5225                         <field name="perm" reporter:datatype="link"/>
5226                 </fields>
5227                 <links>
5228                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5229                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5230                 </links>
5231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5232             <actions>
5233                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5234                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5235                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5236                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5237             </actions>
5238         </permacrud>
5239         </class>
5240         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5242                         <field name="items" oils_persist:virtual="true" />
5243                         <field name="btype" reporter:datatype="text"/>
5244                         <field name="id" reporter:datatype="id" />
5245                         <field name="name" reporter:datatype="text"/>
5246                         <field name="owner" reporter:datatype="link"/>
5247                         <field name="pub" reporter:datatype="bool"/>
5248                         <field name="create_time" reporter:datatype="timestamp" />
5249                 </fields>
5250                 <links>
5251                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5252                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5253                 </links>
5254         </class>
5255         <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">
5256                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5257                         <field name="id" reporter:datatype="id" />
5258                         <field name="bucket" reporter:datatype="link"/>
5259                         <field name="note" reporter:datatype="text" />
5260                 </fields>
5261                 <links>
5262                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5263                 </links>
5264         </class>
5265         <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">
5266                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5267                         <field name="id" reporter:datatype="int" />
5268                         <field name="usr" reporter:datatype="link"/>
5269                         <field name="work_ou" reporter:datatype="link"/>
5270                 </fields>
5271                 <links>
5272                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5273                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5274                 </links>
5275         </class>
5276         <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">
5277                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5278                         <field name="depth" reporter:datatype="int"/>
5279                         <field name="grantable" reporter:datatype="bool"/>
5280                         <field name="id" reporter:datatype="id" />
5281                         <field name="perm" reporter:datatype="link"/>
5282                         <field name="usr" reporter:datatype="link"/>
5283                 </fields>
5284                 <links>
5285                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5286                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5287                 </links>
5288         </class>
5289         <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">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5291                         <field name="object_id" reporter:datatype="text"/>
5292                         <field name="grantable" reporter:datatype="bool"/>
5293                         <field name="id" reporter:datatype="id" />
5294                         <field name="perm" reporter:datatype="link"/>
5295                         <field name="usr" reporter:datatype="link"/>
5296                         <field name="object_type" reporter:datatype="text"/>
5297                 </fields>
5298                 <links>
5299                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5300                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5301                 </links>
5302         </class>
5303         <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">
5304                 <fields oils_persist:primary="id" oils_persist:sequence="">
5305                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5306                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5307                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5308                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5309                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5310                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5311                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5312                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5313                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5314                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5319                 </fields>
5320                 <links>
5321                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5322                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5323                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5324                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5325                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5326                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5327                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5328                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5329                 </links>
5330         </class>
5331         <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">
5332                 <fields oils_persist:primary="id" oils_persist:sequence="">
5333                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5334                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5335                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5336                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5337                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5338                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5339                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5340                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5341                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5342                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5343                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5344                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5345                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5346                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5347                 </fields>
5348                 <links>
5349                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5350                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5351                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5352                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5353                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5354                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5355                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5356                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5357                 </links>
5358         </class>
5359         <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">
5360                 <fields oils_persist:primary="id" oils_persist:sequence="">
5361                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5362                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5363                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5364                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5365                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5366                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5367                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5368                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5369                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5370                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5371                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5372                 </fields>
5373                 <links>
5374                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5375                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5376                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5377                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5378                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5379                 </links>
5380         </class>
5381         <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">
5382                 <fields oils_persist:primary="id" oils_persist:sequence="">
5383                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5384                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5385                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5386                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5387                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5388                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5389                         <field reporter:label="Accepting User" name="accepting_usr" />
5390                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5391                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5392                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5393                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5394                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5395                 </fields>
5396                 <links>
5397                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5398                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5399                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5400                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5401                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5402                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5403                 </links>
5404         </class>
5405         <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">
5406                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5407                         <field name="bucket" reporter:datatype="link"/>
5408                         <field name="id" reporter:datatype="id" />
5409                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5410                         <field name="create_time" reporter:datatype="timestamp" />
5411                         <field name="pos" reporter:datatype="int" />
5412                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5413                 </fields>
5414                 <links>
5415                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5416                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5417             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5418                 </links>
5419         </class>
5420         <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">
5421                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5422                         <field name="id" reporter:datatype="id" />
5423                         <field name="item" reporter:datatype="link"/>
5424                         <field name="note" reporter:datatype="text" />
5425                 </fields>
5426                 <links>
5427                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5428                 </links>
5429         </class>
5430         <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">
5431                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5432                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5433                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5434                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5435                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5436                 </fields>
5437                 <links>
5438                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5439                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5440                 </links>
5441         </class>
5442     <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">
5443         <fields oils_persist:primary="field">
5444             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5445             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5446             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5447         </fields>
5448         <links/>
5449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5450             <actions>
5451                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5452                 <retrieve />
5453                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5454                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5455             </actions>
5456         </permacrud>
5457     </class>
5458         <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">
5459                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5460                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5461                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5462                 </fields>
5463                 <links/>
5464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5465             <actions>
5466                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5467                 <retrieve/>
5468                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5469                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5470             </actions>
5471         </permacrud>
5472         </class>
5473
5474
5475         <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">
5476                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5477                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5478                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5479                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5480                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5481                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5482                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5483                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5484                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5485                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5486                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5487                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5488                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5489                 </fields>
5490                 <links>
5491                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5492                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5493                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5495                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5496                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5497                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5498                 </links>
5499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5500             <actions>
5501                 <create permission="TRANSIT_COPY">
5502                     <context link="target_copy" field="owner"/>
5503                 </create>
5504                 <retrieve/>
5505                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5506                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5507             </actions>
5508         </permacrud>
5509         </class>
5510         <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">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5512                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5513                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5514                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5515                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5516                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5517                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5518                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5519                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5520                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5522                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5523                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5524                 </fields>
5525                 <links>
5526                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5527                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5528                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5529                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5530                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5531                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5532                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5533                 </links>
5534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5535             <actions>
5536                 <create permission="TRANSIT_COPY" context_field="owner">
5537                     <context link="target_copy" field="circ_lib"/>
5538                 </create>
5539                 <retrieve/>
5540                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5541                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5542             </actions>
5543         </permacrud>
5544         </class>
5545         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5546                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5547                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5548                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5549                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5550                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5551                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5552                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5553                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5554                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5555                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5556                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5557                 </fields>
5558                 <links>
5559                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5560                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5561                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5562                 </links>
5563         </class>
5564         <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">
5565                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5566                         <field name="grp" />
5567                         <field name="id" reporter:datatype="id" />
5568                         <field name="usr" />
5569                 </fields>
5570                 <links>
5571                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5572                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5573                 </links>
5574         </class>
5575         <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">
5576                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5577                         <field name="id" reporter:datatype="id" />
5578                         <field name="fq_field" reporter:datatype="text"/>
5579                         <field name="identity_value" reporter:datatype="text"/>
5580                         <field name="translation" reporter:datatype="text"/>
5581                         <field name="string" reporter:datatype="text"/>
5582                 </fields>
5583                 <links>
5584                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5585                 </links>
5586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5587             <actions>
5588                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5589                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5590                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5591                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5592             </actions>
5593         </permacrud>
5594         </class>
5595         <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">
5596                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5597                         <field name="id" reporter:datatype="id" />
5598                         <field name="fm_class" reporter:datatype="text"/>
5599                         <field name="field" reporter:datatype="text"/>
5600                         <field name="owner" reporter:datatype="org_unit"/>
5601                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5602                 </fields>
5603                 <links>
5604                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5605                 </links>
5606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5607             <actions>
5608                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5609                 <retrieve/>
5610                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5611                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5612             </actions>
5613         </permacrud>
5614         </class>
5615         <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">
5616                 <fields oils_persist:primary="code">
5617                         <field name="code" reporter:datatype="id" />
5618                         <field name="marc_code" reporter:datatype="text"/>
5619                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5620                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5621                 </fields>
5622                 <links/>
5623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5624             <actions>
5625                 <create permission="CREATE_LOCALE" global_required="true"/>
5626                 <retrieve/>
5627                 <update permission="UPDATE_LOCALE" global_required="true"/>
5628                 <delete permission="DELETE_LOCALE" global_required="true"/>
5629             </actions>
5630         </permacrud>
5631         </class>
5632         <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">
5633                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5634                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5635                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5636                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5637             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5638                 </fields>
5639                 <links>
5640                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5641                 </links>
5642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5643             <actions>
5644                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5645                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5646                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5647                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5648             </actions>
5649         </permacrud>
5650         </class>
5651
5652         <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">
5653                 <fields oils_persist:primary="id">
5654                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5655                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5656                 </fields>
5657                 <links/>
5658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5659             <actions>
5660                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5661                 <retrieve/>
5662                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5663                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5664             </actions>
5665         </permacrud>
5666         </class>
5667
5668         <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">
5669                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5670                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5671                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5672                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5673                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5674                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5675                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5676                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5677                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5678                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5679                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5680                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5681                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5682                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5683                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5684                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5685                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5686                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5687                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5688                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5689                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5690                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5691                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5692                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5693                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5694                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5695                 </fields>
5696                 <links>
5697                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5698                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5699                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5700                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5701                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5702                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5703                 </links>
5704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5705             <actions>
5706                 <create permission="user_request.create">
5707                     <context link="usr" field="home_ou"/>
5708                                 </create>
5709                 <retrieve permission="user_request.view">
5710                     <context link="usr" field="home_ou"/>
5711                                 </retrieve>
5712                 <update permission="user_request.update">
5713                     <context link="usr" field="home_ou"/>
5714                                 </update>
5715                 <delete permission="user_request.delete">
5716                     <context link="usr" field="home_ou"/>
5717                                 </delete>
5718             </actions>
5719         </permacrud>
5720         </class>
5721
5722         <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">
5723                 <fields oils_persist:primary="code">
5724                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5725                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5726                 </fields>
5727                 <links/>
5728         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5729             <actions>
5730                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5731                 <retrieve/>
5732                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5733                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5734             </actions>
5735         </permacrud>
5736         </class>
5737
5738         <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">
5739                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5740                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5741                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5742                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5743                         <field reporter:label="Ratio" name="ratio" />
5744                 </fields>
5745                 <links>
5746                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5747                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5748                 </links>
5749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5750                         <actions>
5751                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5752                                 <retrieve/>
5753                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5754                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5755                         </actions>
5756                 </permacrud>
5757         </class>
5758
5759         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5760                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5761                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5762                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5763                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5764                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5765                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5766                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5767                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5768                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5769                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5770                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5771                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5772                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5773                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5774                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5775                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5776                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5777                 </fields>
5778                 <links>
5779                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5780                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5781             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5782             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5783             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5784                 </links>
5785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5786             <actions>
5787                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5788                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5789                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5790                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5791             </actions>
5792         </permacrud>
5793         </class>
5794
5795         <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">
5796                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5797                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5798                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5799                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5800                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5801                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5802                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5803                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5804                 </fields>
5805                 <links>
5806                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5807                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5808                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5809                 </links>
5810         </class>
5811
5812         <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">
5813                 <fields oils_persist:primary="code">
5814                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5815                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5816                 </fields>
5817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5818             <actions>
5819                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5820                 <retrieve/>
5821                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5822                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5823             </actions>
5824                 </permacrud>
5825         </class>
5826
5827         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5828                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5829                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5830                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5831                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5832                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5833                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5834                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5835                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5836                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5837                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5838                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5839                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5840                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5841                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5842                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5843                 </fields>
5844                 <links>
5845                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5846                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5847                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5848                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5849                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5850                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5851                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5852                 </links>
5853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5854             <actions>
5855                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5856                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5857                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5858                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5859             </actions>
5860         </permacrud>
5861         </class>
5862
5863         <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">
5864                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5865                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5866                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5867                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5868                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5869                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5870                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5871                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5872                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5873                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5874                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5875                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5876                 </fields>
5877                 <links>
5878                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5879                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5880                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5881                 </links>
5882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5883             <actions>
5884                 <create   permission="ADMIN_INVOICE">
5885                                         <context link="invoice" field="receiver"/>
5886                                 </create>
5887                 <retrieve permission="ADMIN_INVOICE">
5888                                         <context link="invoice" field="receiver"/>
5889                                 </retrieve>
5890                 <update   permission="ADMIN_INVOICE">
5891                                         <context link="invoice" field="receiver"/>
5892                                 </update>
5893                                 <delete   permission="ADMIN_INVOICE">
5894                                         <context link="invoice" field="receiver"/>
5895                                 </delete>
5896             </actions>
5897         </permacrud>
5898         </class>
5899
5900         <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">
5901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5902                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5903                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5904                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5905                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5906                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5907                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5908                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5909                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5910                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5911                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5912                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5913                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5914                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5915                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5916                 </fields>
5917                 <links>
5918                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5919                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5920                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5921                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5922                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5923                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5924                 </links>
5925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5926             <actions>
5927                 <create   permission="ADMIN_INVOICE">
5928                                         <context link="invoice" field="receiver"/>
5929                                 </create>
5930                 <retrieve permission="ADMIN_INVOICE">
5931                                         <context link="invoice" field="receiver"/>
5932                                 </retrieve>
5933                 <update   permission="ADMIN_INVOICE">
5934                                         <context link="invoice" field="receiver"/>
5935                                 </update>
5936                                 <delete   permission="ADMIN_INVOICE">
5937                                         <context link="invoice" field="receiver"/>
5938                                 </delete>
5939             </actions>
5940         </permacrud>
5941         </class>
5942
5943         <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">
5944                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5945                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5946                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5947                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5948                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5949                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5950                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5951                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5952                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5953                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5954                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5955                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5956                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5957                 </fields>
5958                 <links>
5959                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5960                 </links>
5961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5962             <actions>
5963                 <create permission="ADMIN_PROVIDER">
5964                     <context link="provider" field="owner"/>
5965                 </create>
5966                 <retrieve permission="ADMIN_PROVIDER">
5967                     <context link="provider" field="owner"/>
5968                 </retrieve>
5969                 <update permission="ADMIN_PROVIDER">
5970                     <context link="provider" field="owner"/>
5971                 </update>
5972                 <delete permission="ADMIN_PROVIDER">
5973                     <context link="provider" field="owner"/>
5974                 </delete>
5975             </actions>
5976         </permacrud>
5977         </class>
5978
5979         <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">
5980                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5981                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5982                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5983                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5984                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5985                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5986                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5987         </fields>
5988                 <links>
5989                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5990                 </links>
5991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5992             <actions>
5993                 <create permission="ADMIN_PROVIDER">
5994                     <context link="provider" field="owner"/>
5995                 </create>
5996                 <retrieve permission="ADMIN_PROVIDER">
5997                     <context link="provider" field="owner"/>
5998                 </retrieve>
5999                 <update permission="ADMIN_PROVIDER">
6000                     <context link="provider" field="owner"/>
6001                 </update>
6002                 <delete permission="ADMIN_PROVIDER">
6003                     <context link="provider" field="owner"/>
6004                 </delete>
6005             </actions>
6006         </permacrud>
6007     </class>
6008         <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">
6009                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6010                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6011                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6012                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6013                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6014                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6015                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6016                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6017                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6018                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6019                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6020                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6021                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6022                 </fields>
6023                 <links>
6024                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6025                 </links>
6026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6027             <actions>
6028                 <create permission="ADMIN_PROVIDER">
6029                     <context link="contact" jump='provider' field="owner"/>
6030                 </create>
6031                 <retrieve permission="ADMIN_PROVIDER">
6032                     <context link="contact" jump='provider' field="owner"/>
6033                 </retrieve>
6034                 <update permission="ADMIN_PROVIDER">
6035                     <context link="contact" jump='provider' field="owner"/>
6036                 </update>
6037                 <delete permission="ADMIN_PROVIDER">
6038                     <context link="contact" jump='provider' field="owner"/>
6039                 </delete>
6040             </actions>
6041         </permacrud>
6042         </class>
6043
6044         <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">
6045                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6046                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6047                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6048                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6049                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6050                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6051                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6052                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6053                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6054                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6055                 </fields>
6056                 <links>
6057                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6058                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6059                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6060                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6061                 </links>
6062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6063                 </permacrud>
6064         </class>
6065
6066         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6067                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6068                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6069                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6070                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6071                 </fields>
6072                 <links>
6073             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6074                 </links>
6075                 <!--
6076                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6077                         But here's what it should look like if we ever do use pcrud.
6078                 -->
6079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6080                         <actions>
6081                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6082                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6083                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6084                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6085                         </actions>
6086                 </permacrud>
6087         </class>
6088
6089         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6090                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6091                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6092                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6093                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6094                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6095                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6096                 </fields>
6097                 <links>
6098                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6099                 </links>
6100                 <!--
6101                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6102                         But here's what it should look like if we ever do use pcrud.
6103                 -->
6104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6105                         <actions>
6106                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6107                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6108                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6109                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6110                         </actions>
6111                 </permacrud>
6112         </class>
6113
6114         <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">
6115                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6116                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6117                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6118                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6119                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6120                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6121                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6122                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6123                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6124                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6125                 </fields>
6126                 <links>
6127                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6128                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6129             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6130             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6131                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6132                 </links>
6133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6134             <actions>
6135                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6136                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6137                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6138                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6139             </actions>
6140         </permacrud>
6141         </class>
6142
6143         <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">
6144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6145                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6146                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6147                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6148                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6149                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6150                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6151                 </fields>
6152                 <links>
6153                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6154                 </links>
6155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6156                         <actions>
6157                                 <create permission="ADMIN_FUNDING_SOURCE">
6158                     <context link="funding_source" field="owner"/>
6159                 </create>
6160                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6161                     <context link="funding_source" field="owner"/>
6162                 </retrieve>
6163                                 <update permission="ADMIN_FUNDING_SOURCE">
6164                     <context link="funding_source" field="owner"/>
6165                 </update>
6166                                 <delete permission="ADMIN_FUNDING_SOURCE">
6167                     <context link="funding_source" field="owner"/>
6168                 </delete>
6169                         </actions>
6170                 </permacrud>
6171         </class>
6172
6173         <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">
6174                 <fields oils_persist:primary="id">
6175                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6176                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6177                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6178                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6179                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6180                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6181                 </fields>
6182                 <links>
6183                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6184                 </links>
6185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6186                 </permacrud>
6187         </class>
6188
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6191                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6192                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6193                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6194                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6195                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6196                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6197                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6198                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6199                 </fields>
6200                 <links>
6201                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6202                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6203                 </links>
6204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6205                         <actions>
6206                                 <create permission="ADMIN_ACQ_FUND">
6207                     <context link="fund" field="org"/>
6208                 </create>
6209                                 <retrieve permission="ADMIN_ACQ_FUND">
6210                     <context link="fund" field="org"/>
6211                 </retrieve>
6212                                 <update permission="ADMIN_ACQ_FUND">
6213                     <context link="fund" field="org"/>
6214                 </update>
6215                                 <delete permission="ADMIN_ACQ_FUND">
6216                     <context link="fund" field="org"/>
6217                 </delete>
6218                         </actions>
6219                 </permacrud>
6220         </class>
6221
6222         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6223                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6224                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6225                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6226                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6227                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6228                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6229                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6230                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6231                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6232                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6233                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6234                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6235                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6236                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6237                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6238                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6239                 </fields>
6240                 <links>
6241                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6242                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6243             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6244             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6245             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6246                 </links>
6247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6248             <actions>
6249                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6250                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6251                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6252                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6253             </actions>
6254         </permacrud>
6255         </class>
6256
6257         <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">
6258                 <fields oils_persist:primary="fund">
6259                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6260                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6261                 </fields>
6262                 <links>
6263                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6264                 </links>
6265         </class>
6266
6267         <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">
6268                 <fields oils_persist:primary="fund">
6269                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6270                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6271                 </fields>
6272                 <links>
6273                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6274                 </links>
6275         </class>
6276
6277         <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">
6278                 <fields oils_persist:primary="fund">
6279                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6280                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6281                 </fields>
6282                 <links>
6283                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6284                 </links>
6285         </class>
6286
6287         <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">
6288                 <fields oils_persist:primary="fund">
6289                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6290                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6291                 </fields>
6292                 <links>
6293                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6294                 </links>
6295         </class>
6296
6297         <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">
6298                 <fields oils_persist:primary="fund">
6299                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6300                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6301                 </fields>
6302                 <links>
6303                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6304                 </links>
6305         </class>
6306
6307    <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">
6308         <fields oils_persist:primary="fund">
6309             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6310             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6311         </fields>
6312         <links>
6313             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6314         </links>
6315     </class>
6316
6317    <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">
6318         <fields oils_persist:primary="fund">
6319             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6320             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6321         </fields>
6322         <links>
6323             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6324         </links>
6325     </class>
6326
6327    <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">
6328         <fields oils_persist:primary="fund">
6329             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6330             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6331         </fields>
6332         <links>
6333             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6334         </links>
6335     </class>
6336
6337    <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">
6338         <fields oils_persist:primary="fund">
6339             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6340             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6341         </fields>
6342         <links>
6343             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6344         </links>
6345     </class>
6346
6347    <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">
6348         <fields oils_persist:primary="fund">
6349             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6350             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6351         </fields>
6352         <links>
6353             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6354         </links>
6355     </class>
6356
6357         <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">
6358                 <fields oils_persist:primary="funding_source">
6359                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6360                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6361                 </fields>
6362                 <links>
6363                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6364                 </links>
6365         </class>
6366
6367         <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">
6368                 <fields oils_persist:primary="funding_source">
6369                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6370                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6371                 </fields>
6372                 <links>
6373                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6374                 </links>
6375         </class>
6376
6377         <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">
6378                 <fields oils_persist:primary="funding_source">
6379                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6380                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6381                 </fields>
6382                 <links>
6383                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6384                 </links>
6385         </class>
6386
6387         <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">
6388                 <fields oils_persist:primary="fund">
6389                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6390                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6391                 </fields>
6392                 <links>
6393                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6394                 </links>
6395         </class>
6396
6397         <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">
6398                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6399                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6400                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6401                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6402                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6403                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6404                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6405                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6406                 </fields>
6407                 <links>
6408                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6409                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6410                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6411                 </links>
6412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6413                         <actions>
6414                                 <create permission="ADMIN_ACQ_FUND">
6415                     <context link="fund" field="org"/>
6416                 </create>
6417                                 <retrieve permission="ADMIN_ACQ_FUND">
6418                     <context link="fund" field="org"/>
6419                 </retrieve>
6420                                 <update permission="ADMIN_ACQ_FUND">
6421                     <context link="fund" field="org"/>
6422                 </update>
6423                                 <delete permission="ADMIN_ACQ_FUND">
6424                     <context link="fund" field="org"/>
6425                 </delete>
6426                         </actions>
6427                 </permacrud>
6428         </class>
6429
6430     <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">
6431         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6432             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6433             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6434             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6435             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6436             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6437             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6438             <field reporter:label="Note" name="note" reporter:datatype="text" />
6439             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6440         </fields>
6441         <links>
6442             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6443             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6444             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6445         </links>
6446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6447                         <actions>
6448                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6449                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6450                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6451                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6452                         </actions>
6453                 </permacrud>
6454     </class>
6455
6456         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6458                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6459                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6460                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6461                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6462                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6463                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6464                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6465                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6466                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6467                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6468                 </fields>
6469                 <links>
6470                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6471                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6472                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6473                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6474                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6475                 </links>
6476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6477                         <actions>
6478                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6479                         </actions>
6480                 </permacrud>
6481         </class>
6482
6483         <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">
6484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6485                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6486                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6487                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6488                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6489                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6490                 </fields>
6491                 <links>
6492                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6493                 </links>
6494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6495                         <actions>
6496                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6497                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6498                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6499                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6500                         </actions>
6501                 </permacrud>
6502         </class>
6503
6504         <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">
6505                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6506                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6507                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6508                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6509                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6510                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6511                         <field reporter:label="State" name="state" reporter:datatype="text" />
6512                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6513                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6514                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6515                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6516                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6517                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6518                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6519                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6520                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6521                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6522                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6523                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6524                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6525                 </fields>
6526                 <links>
6527                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6528                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6529                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6530                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6531                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6532                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6533                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6534                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6535                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6536                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6537                 </links>
6538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6539                         <actions>
6540                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6541                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6542                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6543                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6544                         </actions>
6545                 </permacrud>
6546         </class>
6547
6548         <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">
6549                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6550                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6551                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6552                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6553                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6554                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6555                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6556                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6557                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6558                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6559                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6560                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6561                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6562                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6563                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6564                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6565                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6566                 </fields>
6567                 <links>
6568                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6569                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6570                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6571                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6572                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6573                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6574                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6575                 </links>
6576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6577             <actions>
6578                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6579             </actions>
6580                 </permacrud>
6581         </class>
6582
6583         <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">
6584                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6585                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6586                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6587                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6588                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6589                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6590                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6591                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6592                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6593                 </fields>
6594                 <links>
6595                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6596                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6597                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6598                 </links>
6599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6600             <actions>
6601                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6602                     <context link="purchase_order" field="ordering_agency"/>
6603                 </retrieve>
6604                 <create permission="CREATE_PURCHASE_ORDER">
6605                     <context link="purchase_order" field="ordering_agency"/>
6606                 </create>
6607                 <update permission="CREATE_PURCHASE_ORDER">
6608                     <context link="purchase_order" field="ordering_agency"/>
6609                 </update>
6610                 <delete permission="CREATE_PURCHASE_ORDER">
6611                     <context link="purchase_order" field="ordering_agency"/>
6612                 </delete>
6613             </actions>
6614                 </permacrud>
6615         </class>
6616
6617         <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">
6618                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6619                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6620                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6621                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6622                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6623                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6624                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6625                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6626                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6627                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6628                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6629                 </fields>
6630                 <links>
6631                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6632                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6633                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6634                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6635                 </links>
6636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6637             <actions>
6638                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6639                     <context link="purchase_order" field="ordering_agency"/>
6640                 </retrieve>
6641                 <create permission="CREATE_PURCHASE_ORDER">
6642                     <context link="purchase_order" field="ordering_agency"/>
6643                 </create>
6644                 <update permission="CREATE_PURCHASE_ORDER">
6645                     <context link="purchase_order" field="ordering_agency"/>
6646                 </update>
6647                 <delete permission="CREATE_PURCHASE_ORDER">
6648                     <context link="purchase_order" field="ordering_agency"/>
6649                 </delete>
6650             </actions>
6651                 </permacrud>
6652         </class>
6653
6654         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6655                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6656                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6657                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6658                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6659                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6660                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6661                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6662                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6663                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6664                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6665                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6666                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6667                         <field reporter:label="State" name="state" reporter:datatype="text" />
6668                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6669                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6670                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6671                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6672                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6673                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6674                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6675                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6676                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6677                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6678                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6679                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6680                 </fields>
6681                 <links>
6682                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6683                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6685                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6686                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6687                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6688                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6689                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6690                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6691                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6692                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6693                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6694                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6695                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6696                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6697                 </links>
6698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6699                         <actions>
6700                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6701                                         <context link="purchase_order" field="ordering_agency"/>
6702                                         <context link="picklist" field="org_unit"/>
6703                                 </retrieve>
6704                         </actions>
6705                 </permacrud>
6706         </class>
6707
6708         <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">
6709                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6710                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6711                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6712                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6713                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6714                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6715                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6716                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6717                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6718                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6719                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6720                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6721                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6722                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6723                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6724                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6725                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6726                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6727                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6728                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6729                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6730                 </fields>
6731                 <links>
6732                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6733                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6734                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6735                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6736                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6737                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6738                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6739                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6740                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6741                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6742                 </links>
6743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6744                         <actions>
6745                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6746                                         <context link="purchase_order" field="ordering_agency"/>
6747                                         <context link="picklist" field="org_unit"/>
6748                                 </retrieve>
6749                         </actions>
6750                 </permacrud>
6751         </class>
6752
6753         <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">
6754                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6755                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6756                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6757                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6758                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6759                 </fields>
6760                 <links>
6761                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6762                 </links>
6763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6764                         <actions>
6765                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6766                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6767                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6768                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6769                         </actions>
6770                 </permacrud>
6771         </class>
6772
6773         <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">
6774                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6775                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6776                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6777                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6778                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6779                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6780                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6781                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6782                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6783                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6784                 </fields>
6785                 <links>
6786                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6787                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6788                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6789                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6790                 </links>
6791         </class>
6792
6793         <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">
6794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6795                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6796                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6797                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6798                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6799                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6800                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6801                 </fields>
6802                 <links>
6803                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6804                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6805                 </links>
6806         </class>
6807
6808         <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">
6809                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6810                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6811                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6812                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6813                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6814                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6815                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6816                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6817                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6818                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6819                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6820                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6821                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6822                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6823                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6824                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6825                 </fields>
6826                 <links>
6827                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6828                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6829                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6830                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6831                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6832                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6833                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6834                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6835                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6836                 </links>
6837         </class>
6838
6839         <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">
6840                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6841                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6842                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6843                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6844                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6845                 </fields>
6846                 <links/>
6847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6848                         <actions>
6849                                 <retrieve />
6850                         </actions>
6851                 </permacrud>
6852         </class>
6853
6854         <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">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6856                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6857                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6858                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6859                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6860                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6861             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6862                 </fields>
6863                 <links/>
6864         <permacrud>
6865             <actions>
6866                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6867                 <retrieve />
6868                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6869                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6870             </actions>
6871         </permacrud>
6872         </class>
6873
6874         <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">
6875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6876                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6877                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6878                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6879                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6880                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6881                 </fields>
6882                 <links/>
6883         </class>
6884         <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">
6885                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6886                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6887                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6888                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6889                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6890                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6891                 </fields>
6892                 <links>
6893                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6894                 </links>
6895         </class>
6896
6897         <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">
6898             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6899                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6900                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6901                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6902                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6903                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6904                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6905         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6906
6907             </fields>
6908             <links>
6909                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6910             </links>
6911             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6912                 <actions>
6913                     <create permission="ADMIN_PROVIDER">
6914                         <context link="provider" field="owner"/>
6915                     </create>
6916                     <retrieve permission="ADMIN_PROVIDER">
6917                         <context link="provider" field="owner"/>
6918                     </retrieve>
6919                     <update permission="ADMIN_PROVIDER">
6920                         <context link="provider" field="owner"/>
6921                     </update>
6922                     <delete permission="ADMIN_PROVIDER">
6923                         <context link="provider" field="owner"/>
6924                     </delete>
6925                 </actions>
6926             </permacrud>
6927         </class>
6928         
6929         <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">
6930             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6931                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6932                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6933                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6934                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6935             </fields>
6936             <links>
6937                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6938             </links>
6939             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6940                 <actions>
6941                     <create permission="ADMIN_PROVIDER">
6942                         <context link="provider" field="owner"/>
6943                     </create>
6944                     <retrieve permission="ADMIN_PROVIDER">
6945                         <context link="provider" field="owner"/>
6946                     </retrieve>
6947                     <update permission="ADMIN_PROVIDER">
6948                         <context link="provider" field="owner"/>
6949                     </update>
6950                     <delete permission="ADMIN_PROVIDER">
6951                         <context link="provider" field="owner"/>
6952                     </delete>
6953                 </actions>
6954             </permacrud>
6955         </class>
6956         
6957         <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">
6958             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6959                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6960                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6961                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6962                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6963                 </fields>
6964                 <links/>
6965         </class>
6966
6967         <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">
6968                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6969                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6970                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6971                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6972                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6973                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6974                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6975                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6976                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6977                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6978                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6979                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6980                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6981                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6982                 </fields>
6983                 <links>
6984                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6985                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6986                 </links>
6987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6988             <actions>
6989                 <create permission="ADMIN_PROVIDER">
6990                     <context link="provider" field="owner"/>
6991                 </create>
6992                 <retrieve permission="ADMIN_PROVIDER">
6993                     <context link="provider" field="owner"/>
6994                 </retrieve>
6995                 <update permission="ADMIN_PROVIDER">
6996                     <context link="provider" field="owner"/>
6997                 </update>
6998                 <delete permission="ADMIN_PROVIDER">
6999                     <context link="provider" field="owner"/>
7000                 </delete>
7001             </actions>
7002         </permacrud>
7003         </class>
7004
7005         <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">
7006                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7007                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7008                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7009                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7010                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7011                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7012                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7013                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7014                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7015                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7016                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7017                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7018                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7019                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7020                 </fields>
7021                 <links>
7022                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7023                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7024                 </links>
7025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7026             <actions>
7027                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7028                     <context link="account" jump="provider" field="owner"/>
7029                 </retrieve>
7030                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7031                     <context link="account" jump="provider" field="owner"/>
7032                 </update>
7033                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7034                     <context link="account" jump="provider" field="owner"/>
7035                 </delete>
7036             </actions>
7037         </permacrud>
7038         </class>
7039
7040
7041         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7042                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7043                         <field name="id" reporter:datatype="id" />
7044                         <field name="parent" reporter:datatype="link"/>
7045                         <field name="owner" reporter:datatype="link"/>
7046                         <field name="create_time" reporter:datatype="timestamp"/>
7047                         <field name="name" reporter:datatype="text"/>
7048                         <field name="shared" reporter:datatype="bool"/>
7049                         <field name="share_with" reporter:datatype="link"/>
7050                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7051                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7052                 </fields>
7053                 <links>
7054                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7055                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7056                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7057                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7058                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7059                 </links>
7060         </class>
7061         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7062                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7063                         <field name="id" reporter:datatype="id" />
7064                         <field name="parent" reporter:datatype="link"/>
7065                         <field name="owner" reporter:datatype="link"/>
7066                         <field name="create_time" reporter:datatype="timestamp"/>
7067                         <field name="name" reporter:datatype="text"/>
7068                         <field name="shared" reporter:datatype="bool"/>
7069                         <field name="share_with" reporter:datatype="link"/>
7070                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7071                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7072                 </fields>
7073                 <links>
7074                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7075                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7076                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7077                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7078                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7079                 </links>
7080         </class>
7081         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7083                         <field name="id" reporter:datatype="id" />
7084                         <field name="parent" reporter:datatype="link"/>
7085                         <field name="owner" reporter:datatype="link"/>
7086                         <field name="create_time" reporter:datatype="timestamp"/>
7087                         <field name="name" reporter:datatype="text"/>
7088                         <field name="shared" reporter:datatype="bool"/>
7089                         <field name="share_with" reporter:datatype="link"/>
7090                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7091                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7092                 </fields>
7093                 <links>
7094                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7095                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7096                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7097                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7098                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7099                 </links>
7100         </class>
7101         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7102                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7103                         <field name="id" reporter:datatype="id" />
7104                         <field name="owner" reporter:datatype="link"/>
7105                         <field name="create_time" reporter:datatype="timestamp"/>
7106                         <field name="name" reporter:datatype="text"/>
7107                         <field name="data" reporter:datatype="text"/>
7108                         <field name="folder" reporter:datatype="link"/>
7109                         <field name="description" reporter:datatype="text"/>
7110                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7111                 </fields>
7112                 <links>
7113                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7114                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7115                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7116                 </links>
7117         </class>
7118         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7119                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7120                         <field name="id" reporter:datatype="id" />
7121                         <field name="owner" reporter:datatype="link"/>
7122                         <field name="create_time" reporter:datatype="timestamp"/>
7123                         <field name="template" reporter:datatype="link"/>
7124                         <field name="data" reporter:datatype="text"/>
7125                         <field name="folder" reporter:datatype="link"/>
7126                         <field name="recur" reporter:datatype="bool"/>
7127                         <field name="recurrence" reporter:datatype="interval"/>
7128                         <field name="name" reporter:datatype="text"/>
7129                         <field name="description" reporter:datatype="text"/>
7130                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7131                 </fields>
7132                 <links>
7133                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7134                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7135                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7136                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7137                 </links>
7138         </class>
7139         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7140                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7141                         <field name="id" reporter:datatype="id" />
7142                         <field name="runner" reporter:datatype="link"/>
7143                         <field name="start_time" reporter:datatype="timestamp"/>
7144                         <field name="complete_time" reporter:datatype="timestamp"/>
7145                         <field name="run_time" reporter:datatype="timestamp"/>
7146                         <field name="email" reporter:datatype="text"/>
7147                         <field name="excel_format" reporter:datatype="bool"/>
7148                         <field name="csv_format" reporter:datatype="bool"/>
7149                         <field name="html_format" reporter:datatype="bool"/>
7150                         <field name="error_code" reporter:datatype="int"/>
7151                         <field name="error_text" reporter:datatype="text"/>
7152                         <field name="report" reporter:datatype="link"/>
7153                         <field name="folder" reporter:datatype="link"/>
7154                         <field name="chart_pie" reporter:datatype="bool"/>
7155                         <field name="chart_bar" reporter:datatype="bool"/>
7156                         <field name="chart_line" reporter:datatype="bool"/>
7157                 </fields>
7158                 <links>
7159                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7160                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7161                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7162                 </links>
7163         </class>
7164         <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">
7165                 <fields oils_persist:primary="id">
7166                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7167                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7168                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7169                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7170                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7171                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7172                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7173                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7174                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7175                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7176                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7177                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7178                 </fields>
7179                 <links>
7180                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7181                 </links>
7182         </class>
7183         <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">
7184                 <fields oils_persist:primary="id">
7185                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7186                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7187                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7188                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7189                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7190                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7191                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7192                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7193                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7194                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7195                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7196                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7197                 </fields>
7198                 <links>
7199                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7200                 </links>
7201         </class>
7202         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7203                 <fields oils_persist:primary="id">
7204                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7205                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7206                         <field reporter:label="Fingerprint" name="fingerprint" />
7207                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7208                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7209                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7210                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7211                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7212                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7213                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7214                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7215                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7216                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7217                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7218                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7219                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7220                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7221                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7222                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7223                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7224                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7225                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7226                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7227                 </fields>
7228                 <links>
7229                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7230                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7231                 </links>
7232         </class>
7233         <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">
7234                 <fields oils_persist:primary="id">
7235                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7236                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7237                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7238                 </fields>
7239                 <links>
7240                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7241                 </links>
7242         </class>
7243         <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">
7244                 <fields oils_persist:primary="id">
7245                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7246                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7247                 </fields>
7248                 <links>
7249                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7250                 </links>
7251         </class>
7252         <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">
7253                 <fields oils_persist:primary="id">
7254                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7255                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7256                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7257                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7258                 </fields>
7259                 <links>
7260                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7261                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7262                 </links>
7263         </class>
7264         <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">
7265                 <fields oils_persist:primary="xact">
7266                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7267                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7268                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7269                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7270                 </fields>
7271                 <links>
7272                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7273                 </links>
7274         </class>
7275         <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">
7276                 <fields oils_persist:primary="xact">
7277                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7278                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7279                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7280                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7281                 </fields>
7282                 <links>
7283                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7284                 </links>
7285         </class>
7286         <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)">
7287                 <fields oils_persist:primary="id">
7288                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7289                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7290                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7291                 </fields>
7292                 <links>
7293                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7294                 </links>
7295         </class>
7296         <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">
7297                 <fields oils_persist:primary="id">
7298                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7299                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7300                 </fields>
7301                 <links>
7302                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7303                 </links>
7304         </class>
7305         <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">
7306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7307                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7308                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7309                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7310                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7311                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7312                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7313                 </fields>
7314                 <links>
7315                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7316                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7317                 </links>
7318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7319                         <actions>
7320                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7321                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7322                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7323                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7324                         </actions>
7325                 </permacrud>
7326         </class>
7327         <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">
7328                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7329                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7330                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7331                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7332                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7333                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7334                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7335                 </fields>
7336                 <links>
7337                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7338                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7339                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7340                 </links>
7341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7342                         <actions>
7343                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7344                                         <context link="formula" field="owner"/>
7345                                 </create>
7346                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7347                                         <context link="formula" field="owner"/>
7348                                 </retrieve>
7349                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7350                                         <context link="formula" field="owner"/>
7351                                 </update>
7352                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7353                                         <context link="formula" field="owner"/>
7354                                 </delete>
7355                         </actions>
7356                 </permacrud>
7357         </class>
7358
7359         <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">
7360                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7361                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7362                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7363                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7364                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7365                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7366                 </fields>
7367                 <links>
7368                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7369                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7370                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7371                 </links>
7372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7373                         <actions>
7374                                 <create permission="CREATE_PURCHASE_ORDER">
7375                                         <context link="formula" field="owner"/>
7376                 </create>
7377                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7378                                         <context link="formula" field="owner"/>
7379                 </retrieve>
7380                                 <update permission="CREATE_PURCHASE_ORDER">
7381                                         <context link="formula" field="owner"/>
7382                 </update>
7383                                 <delete permission="CREATE_PURCHASE_ORDER">
7384                                         <context link="formula" field="owner"/>
7385                 </delete>
7386                         </actions>
7387                 </permacrud>
7388         </class>
7389
7390         <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">
7391                 <fields oils_persist:primary="id">
7392                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7393                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7394                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7395                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7396                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7397                 </fields>
7398                 <links>
7399                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7400                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7401                 </links>
7402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7403                 </permacrud>
7404         </class>
7405
7406         <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">
7407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7408                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7409                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7410                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7411                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7412                 </fields>
7413                 <links>
7414                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7415                 </links>
7416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7417                         <actions>
7418                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7419                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7420                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7421                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7422                         </actions>
7423                 </permacrud>
7424         </class>
7425
7426         <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">
7427                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7428                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7429                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7430                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7431                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7432                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7433                 </fields>
7434                 <links>
7435                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7436                 </links>
7437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7438                         <actions>
7439                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7440                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7441                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7442                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7443                         </actions>
7444                 </permacrud>
7445         </class>
7446
7447         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7448                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7449                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7450                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7451                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7452                 </fields>
7453                 <links>
7454                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7455                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7456                 </links>
7457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7458                 </permacrud>
7459         </class>
7460
7461         <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">
7462                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7463                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7464                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7465                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7466                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7467                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7468                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7469                 </fields>
7470                 <links>
7471                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7472                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7473                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7474                 </links>
7475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476                 </permacrud>
7477         </class>
7478
7479         <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">
7480                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7481                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7482                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7483                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7484                 </fields>
7485                 <links>
7486                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7487                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7488                 </links>
7489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7490                 </permacrud>
7491         </class>
7492
7493         <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">
7494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7495                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7496                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7497                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7498                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7499                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7500                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7501                 </fields>
7502                 <links>
7503                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7504                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7505                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7506                 </links>
7507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7508                 </permacrud>
7509         </class>
7510
7511         <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">
7512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7513                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7514                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7515                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7516                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7517                 </fields>
7518                 <links>
7519                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7520                 </links>
7521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7522             <actions>
7523                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7524                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7525                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7526                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7527             </actions>
7528                 </permacrud>
7529         </class>
7530
7531         <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">
7532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7533                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7534                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7535                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7536                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7537                 </fields>
7538                 <links>
7539                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7540                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7541                 </links>
7542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7543                         <actions>
7544                                 <create permission="ADMIN_CLAIM_POLICY">
7545                                         <context link="claim_policy" field="org_unit"/>
7546                 </create>
7547                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7548                                         <context link="claim_policy" field="org_unit"/>
7549                 </retrieve>
7550                                 <update permission="ADMIN_CLAIM_POLICY">
7551                                         <context link="claim_policy" field="org_unit"/>
7552                 </update>
7553                                 <delete permission="ADMIN_CLAIM_POLICY">
7554                                         <context link="claim_policy" field="org_unit"/>
7555                 </delete>
7556                         </actions>
7557                 </permacrud>
7558         </class>
7559
7560     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7561         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7562             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7563             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7564             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7565             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7566             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7567             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7568             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7569             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7570             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7571             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7572             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7573             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7574             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7575             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7576             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7577         </fields>
7578     </class>
7579
7580     <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">
7581         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7582             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7583             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7584             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7585             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7586             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7587         </fields>
7588     </class>
7589
7590     <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">
7591         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7592             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7593             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7594             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7595             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7596             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7597             <field reporter:label="City" name="city" reporter:datatype="text"/>
7598             <field reporter:label="State" name="state" reporter:datatype="text"/>
7599             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7600             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7601             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7602         </fields>
7603     </class>
7604
7605     <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">
7606         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7607             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7608             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7609             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7610             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7611             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7612             <field reporter:label="City" name="city" reporter:datatype="text"/>
7613             <field reporter:label="State" name="state" reporter:datatype="text"/>
7614             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7615             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7616             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7617         </fields>
7618     </class>
7619
7620     <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">
7621         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7622             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7623             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7624             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7625             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7626             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7627             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7628         </fields>
7629     </class>
7630
7631         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7632                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7633                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7634                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7635                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7636                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7637                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7638                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7639                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7640                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7641                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7642                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7643                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7644                 </fields>
7645                 <links>
7646                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7647                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7648                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7649                 </links>
7650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7651                 </permacrud>
7652         </class>
7653
7654         <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">
7655                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7656                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7657                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7658                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7659                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7660                 </fields>
7661                 <links>
7662                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7663                 </links>
7664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7665                 </permacrud>
7666         </class>
7667
7668     <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">
7669         <fields>
7670             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7671             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7672             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7673         </fields>
7674                 <links>
7675                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7676                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7677                 </links>
7678     </class>
7679
7680     <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">
7681         <fields>
7682             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7683             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7684         </fields>
7685                 <links>
7686                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7687                 </links>
7688     </class>
7689
7690     <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">
7691         <fields>
7692             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7693             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7694             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7695         </fields>
7696                 <links>
7697                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7698                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7699                 </links>
7700     </class>
7701
7702     <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">
7703         <fields>
7704             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7705             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7706         </fields>
7707                 <links>
7708                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7709                 </links>
7710     </class>
7711
7712     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7713                 <oils_persist:source_definition>
7714
7715             SELECT  DISTINCT l.*
7716               FROM  action.unfulfilled_hold_loops l
7717                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7718               WHERE l.count = m.max
7719
7720                 </oils_persist:source_definition>
7721         <fields>
7722             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7723             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7724             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7725         </fields>
7726                 <links>
7727                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7728                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7729                 </links>
7730     </class>
7731
7732         <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">
7733                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7734                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7735                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7736                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7737                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7738                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7739                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7740                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7741                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7742                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7743                 </fields>
7744                 <links>
7745                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7746                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7747                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7748                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7749                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7750                 </links>
7751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7752                 </permacrud>
7753         </class>
7754
7755         <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">
7756                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7757                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7758                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7759                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7760                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7761                 </fields>
7762                 <links>
7763                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7764                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7765                 </links>
7766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7767                 </permacrud>
7768         </class>
7769
7770         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7771                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7772                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7773                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7774                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7775                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7776                 </fields>
7777                 <links>
7778                 </links>
7779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7780                 </permacrud>
7781         </class>
7782
7783         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7784                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7785                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7786                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7787                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7788                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7789                 </fields>
7790                 <links>
7791                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7792                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7793                 </links>
7794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7795                 </permacrud>
7796         </class>
7797         
7798         <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">
7799                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7800                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7801                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7802                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7803                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7804                 </fields>
7805                 <links>
7806                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7807                 </links>
7808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7809                 </permacrud>
7810         </class>
7811         
7812         <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">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7814                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7815                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7816                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7817                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7818                 </fields>
7819                 <links>
7820                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7821                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7822                 </links>
7823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7824                 </permacrud>
7825         </class>
7826
7827         <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">
7828                 <fields oils_persist:primary="name">
7829                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7830                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7831                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7832                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7833                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7834                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7835                 </fields>
7836                 <links>
7837                 </links>
7838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7839                 </permacrud>
7840         </class>
7841
7842         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7843                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7844                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7845                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7846                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7847                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7848                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7849                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7850                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7851                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7852                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7853                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7854                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7855                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7856                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7857                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7858                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7859                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7860                 </fields>
7861                 <links>
7862                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7863                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7864                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7865                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7866                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7867                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7868                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7869                 </links>
7870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7871                 </permacrud>
7872         </class>
7873
7874         <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">
7875                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7876                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7877                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7878                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7879                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7880                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7881                 </fields>
7882                 <links>
7883                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7884                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7885                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7886                 </links>
7887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7888                 </permacrud>
7889         </class>
7890
7891         <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">
7892                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7893                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7894                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7895                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7896                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7897                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7898                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7899                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7900                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7901                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7902                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7903                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7904                 </fields>
7905                 <links>
7906                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7907                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7908                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7909                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7910                 </links>
7911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7912                 </permacrud>
7913         </class>
7914
7915         <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">
7916                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7917                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7918                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7919                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7920                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7921                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7922                 </fields>
7923                 <links>
7924                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7925                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7926                 </links>
7927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7928                 </permacrud>
7929         </class>
7930
7931         <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">
7932                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7933                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7934                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7935                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7936                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7937                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7938                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7939                 </fields>
7940                 <links>
7941                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7942                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7943                 </links>
7944                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7945                 </permacrud>
7946         </class>
7947
7948         <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">
7949                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7950                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7951                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7952                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7953                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7954                 </fields>
7955                 <links>
7956                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7957                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7958                 </links>
7959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7960                 </permacrud>
7961         </class>
7962
7963         <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">
7964                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7965                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7966                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7967                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7968                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7969                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7970                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7971                 </fields>
7972                 <links>
7973                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7974                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7975                 </links>
7976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7977                 </permacrud>
7978         </class>
7979
7980         <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">
7981                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7982                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7983                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7984                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7985                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7986                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7987                 </fields>
7988                 <links>
7989                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7990                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7991                 </links>
7992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7993                 </permacrud>
7994         </class>
7995
7996         <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">
7997                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7998                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7999                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8000                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8001                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8002                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8003                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8004                 </fields>
8005                 <links>
8006                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8007                 </links>
8008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8009                 </permacrud>
8010         </class>
8011
8012         <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">
8013                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8014                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8015                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8016                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8017                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8018                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8019                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8020                 </fields>
8021                 <links>
8022                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8023                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8024                 </links>
8025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8026                 </permacrud>
8027         </class>
8028
8029         <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">
8030                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8031                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8032                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8033                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8034                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8035                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8036                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8037                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8038                 </fields>
8039                 <links>
8040                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8041                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8042                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8043                 </links>
8044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8045                 </permacrud>
8046         </class>
8047
8048         <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">
8049                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8050                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8051                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8052                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8053                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8054                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8055                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8056                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8057                 </fields>
8058                 <links>
8059                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8060                 </links>
8061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8062                 </permacrud>
8063         </class>
8064
8065         <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">
8066                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8067                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8068                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8069                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8070                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8071                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8072                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8073                 </fields>
8074                 <links>
8075                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8076                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8077                 </links>
8078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8079                 </permacrud>
8080         </class>
8081
8082         <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">
8083                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8084                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8085                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8086                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8087                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8088                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8089                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8090                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8091                 </fields>
8092                 <links>
8093                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8094                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8095                 </links>
8096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8097                 </permacrud>
8098         </class>
8099
8100         <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">
8101                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8102                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8103                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8104                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8105                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8106                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8107                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8108                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8109                 </fields>
8110                 <links>
8111                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8112                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8113                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8114                 </links>
8115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8116                 </permacrud>
8117         </class>
8118
8119         <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">
8120                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8121                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8122                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8123                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8124                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8125                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8126                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8127                 </fields>
8128                 <links>
8129                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8130                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8131                 </links>
8132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8133                 </permacrud>
8134         </class>
8135
8136         <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">
8137                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8138                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8139                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8140                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8141                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8142                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8143                 </fields>
8144                 <links>
8145                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8146                 </links>
8147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8148                 </permacrud>
8149         </class>
8150
8151         <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">
8152                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8153                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8154                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8155                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8156                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8157                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8158                 </fields>
8159                 <links>
8160                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8161                 </links>
8162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8163                 </permacrud>
8164         </class>
8165
8166         <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">
8167                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8168                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8169                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8170                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8171                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8172                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8173                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8174                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8175                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8176                 </fields>
8177                 <links>
8178                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8179                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8180                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8181                 </links>
8182                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8183                 </permacrud>
8184         </class>
8185
8186         <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">
8187                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8188                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8189                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8190                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8191                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8192                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8193                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8194                 </fields>
8195                 <links>
8196                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8197                 </links>
8198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8199                 </permacrud>
8200         </class>
8201
8202         <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">
8203                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8204                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8205                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8206                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8207                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8208                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8209                 </fields>
8210                 <links>
8211                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8212                 </links>
8213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8214                 </permacrud>
8215         </class>
8216
8217         <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">
8218                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8219                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8220                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8221                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8222                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8223                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8224                 </fields>
8225                 <links>
8226                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8227                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8228                 </links>
8229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8230                 </permacrud>
8231         </class>
8232
8233         <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">
8234                 <fields oils_persist:primary="id">
8235                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8236                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8237                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8238                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8239                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8240                 </fields>
8241                 <links>
8242                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8243                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8244                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8245                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8246                 </links>
8247         </class>
8248
8249         <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">
8250                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8251                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8252                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8253                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8254                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8255                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8256                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8257                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8258                 </fields>
8259                 <links/>
8260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8261                         <actions>
8262                                 <retrieve/>
8263                         </actions>
8264                 </permacrud>
8265         </class>
8266
8267         <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">
8268                 <fields oils_persist:primary="ptype_key">
8269                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8270                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8271                 </fields>
8272                 <links/>
8273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8274                         <actions>
8275                                 <retrieve/>
8276                         </actions>
8277                 </permacrud>
8278         </class>
8279
8280         <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">
8281                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8282                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8283                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8284                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8285                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8286                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8287                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8288                 </fields>
8289                 <links>
8290                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8291                 </links>
8292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8293                         <actions>
8294                                 <retrieve/>
8295                         </actions>
8296                 </permacrud>
8297         </class>
8298
8299         <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">
8300                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8301                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8302                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8303                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8304                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8305                 </fields>
8306                 <links>
8307                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8308                 </links>
8309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8310                         <actions>
8311                                 <retrieve/>
8312                         </actions>
8313                 </permacrud>
8314         </class>
8315
8316         <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">
8317                 <fields oils_persist:primary="code">
8318                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8319                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8320                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8321                 </fields>
8322                 <links/>
8323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8324                         <actions>
8325                                 <retrieve/>
8326                         </actions>
8327                 </permacrud>
8328         </class>
8329
8330         <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">
8331                 <oils_persist:source_definition>
8332
8333             SELECT  b.id,
8334                     MAX(dcp.edit_date) AS last_delete_date
8335              FROM   biblio.record_entry b
8336                     JOIN asset.call_number cn ON (cn.record = b.id)
8337                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8338              WHERE  NOT b.deleted
8339              GROUP BY b.id
8340              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8341
8342                 </oils_persist:source_definition>
8343                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8344                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8345                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8346                 </fields>
8347                 <links>
8348                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8349                 </links>
8350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8351                         <actions>
8352                                 <retrieve/>
8353                         </actions>
8354                 </permacrud>
8355         </class>
8356
8357         <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">
8358                 <oils_persist:source_definition>
8359
8360             -- -- 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.
8361             -- -- 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
8362             -- -- may not.
8363             -- SELECT
8364             --     bre.id AS "bib_id",
8365             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8366             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8367             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8368             -- FROM (
8369                 SELECT
8370                     y.bre AS "id",
8371                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8372                     y.hold_count AS "hold_count",
8373                     (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"
8374                 FROM (
8375                         SELECT
8376                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8377                             COUNT(*) AS "hold_count"
8378                         FROM action.hold_request h
8379                         WHERE
8380                             cancel_time IS NULL
8381                             AND fulfillment_time IS NULL
8382                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8383                         GROUP BY 1
8384                     )y LEFT JOIN (
8385                         SELECT 
8386                             (SELECT id
8387                                 FROM biblio.record_entry 
8388                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8389                             ) AS "bre", 
8390                             COUNT(*) AS "copy_count"
8391                         FROM asset.copy
8392                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8393                         WHERE copy.holdable 
8394                             AND NOT copy.deleted 
8395                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8396                         GROUP BY 1
8397                     )x ON x.bre = y.bre
8398                 -- )z RIGHT JOIN (
8399                 --     SELECT id
8400                 --     FROM biblio.record_entry
8401                 --     WHERE NOT deleted
8402                 -- )bre ON (z.bib_id = bre.id)
8403                 
8404
8405                 </oils_persist:source_definition>
8406                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8407                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8408                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8409                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8410                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8411                 </fields>
8412                 <links>
8413                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8414                 </links>
8415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8416                         <actions>
8417                                 <retrieve/>
8418                         </actions>
8419                 </permacrud>
8420         </class>
8421
8422         <!-- ********************************************************************************************************************* -->
8423         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8424         <!-- ********************************************************************************************************************* -->
8425         <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">
8426                 <fields oils_persist:primary="id">
8427                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8428                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8429                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8430                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8431                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8432                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8433                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8434                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8435                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8436                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8437                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8438                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8439                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8440                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8441                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8442                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8443                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8444                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8445                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8446                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8447                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8448                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8449                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8450                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8451                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8452                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8453                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8454                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8455                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8456                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8457                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8458                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8459                 </fields>
8460                 <links>
8461                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8462                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8463                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8464                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8465                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8466                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8467                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8468                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8469                 </links>
8470         </class>
8471
8472         <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">
8473                 <fields oils_persist:primary="id">
8474                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8475                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8476                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8477                 </fields>
8478                 <links>
8479                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8480                 </links>
8481         </class>
8482
8483         <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">
8484                 <fields oils_persist:primary="id">
8485                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8486                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8487                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8488                 </fields>
8489                 <links>
8490                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8491                 </links>
8492         </class>
8493
8494         <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">
8495                 <fields oils_persist:primary="id">
8496                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8497
8498                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8499                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8500                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8501
8502                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8503                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8504                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8505
8506                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8507                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8508
8509                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8510                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8511                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8512
8513                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8514                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8515
8516                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8517                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8518                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8519
8520                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8521                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8522                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8523
8524                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8525                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8526                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8527                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8528
8529                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8530                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8531
8532                 </fields>
8533                 <links>
8534                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8535                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8536                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8537                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8538                 </links>
8539         </class>
8540
8541         <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">
8542                 <oils_persist:source_definition>
8543
8544             SELECT
8545                 po.ordering_agency AS ordering_agency,
8546                 po.id AS purchase_order,
8547                 li.id AS lineitem,
8548                 lid.id AS lineitem_detail,
8549                 cpa.id AS claim_policy_action
8550             FROM
8551                 acq.lineitem_detail lid
8552                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8553                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8554                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8555                 JOIN acq.claim_policy_action cpa ON (
8556                     cpa.claim_policy = cp.id
8557
8558                     -- we only care about claim policy actions whose claim
8559                     -- interval we'd reached or exceeded
8560                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8561
8562                     -- filter out all claim policy actions where claim events
8563                     -- have occurred on or after the action's action_interval
8564                     AND NOT EXISTS (
8565                         SELECT 1
8566                         FROM
8567                             acq.claim_event evt
8568                             JOIN acq.claim claim ON (
8569                                 claim.id = evt.claim
8570                                 AND claim.lineitem_detail = lid.id
8571                             )
8572                         WHERE
8573                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8574                     )
8575                 )
8576             WHERE
8577                 lid.cancel_reason IS NULL
8578                 AND li.cancel_reason IS NULL -- belt/suspenders
8579                 AND po.cancel_reason IS NULL -- belt/suspenders
8580                 AND lid.recv_time IS NULL
8581                 AND po.state = 'on-order'
8582             ORDER BY 1, 2, 3, 4, 5
8583
8584                 </oils_persist:source_definition>
8585                 <fields>
8586                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8587                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8588                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8589                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8590                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8591                 </fields>
8592                 <links>
8593                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8594                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8595                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8596                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8597                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8598                 </links>
8599         </class>
8600
8601         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8602                 <oils_persist:source_definition>
8603
8604             SELECT 
8605                 li.id AS lineitem, 
8606                 (
8607                     SELECT COUNT(lid.id) 
8608                     FROM acq.lineitem_detail lid
8609                     WHERE lineitem = li.id
8610                 ) AS item_count,
8611                 (
8612                     SELECT COUNT(lid.id) 
8613                     FROM acq.lineitem_detail lid
8614                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8615                 ) AS recv_count,
8616                 (
8617                     SELECT COUNT(lid.id) 
8618                     FROM acq.lineitem_detail lid
8619                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8620                 ) AS cancel_count,
8621                 (
8622                     SELECT COUNT(lid.id) 
8623                     FROM acq.lineitem_detail lid
8624                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8625                     WHERE NOT debit.encumbrance AND lineitem = li.id
8626                 ) AS invoice_count,
8627                 (
8628                     SELECT COUNT(DISTINCT(lid.id)) 
8629                     FROM acq.lineitem_detail lid
8630                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8631                     WHERE lineitem = li.id
8632                 ) AS claim_count,
8633                 (
8634                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8635                     FROM acq.lineitem_detail lid
8636                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8637                 ) AS estimated_amount,
8638                 (
8639                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8640                     FROM acq.lineitem_detail lid
8641                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8642                     WHERE debit.encumbrance AND lineitem = li.id
8643                 ) AS encumbrance_amount,
8644                 (
8645                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8646                     FROM acq.lineitem_detail lid
8647                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8648                     WHERE NOT debit.encumbrance AND lineitem = li.id
8649                 ) AS paid_amount
8650
8651                 FROM acq.lineitem AS li
8652         </oils_persist:source_definition>
8653                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8654                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8655                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8656                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8657                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8658                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8659                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8660                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8661                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8662                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8663                 </fields>
8664                 <links>
8665                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8666                 </links>
8667     </class>
8668
8669
8670         <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">
8671                 <oils_persist:source_definition>
8672
8673                         SELECT  t.*
8674                           FROM  action.transit_copy t
8675                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8676                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8677                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8678
8679                 </oils_persist:source_definition>
8680                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8681                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8682                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8683                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8684                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8685                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8686                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8687                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8688                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8689                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8690                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8691                 </fields>
8692                 <links>
8693                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8694                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8695                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8696                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8697                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8698                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8699                 </links>
8700         </class>
8701
8702     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8703                 <oils_persist:source_definition>
8704
8705         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8706                 SELECT
8707                         cp.id as copy,
8708                         COUNT(circ.id),
8709                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8710                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8711                 FROM
8712                         asset.copy cp
8713                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8714                 GROUP BY 1, 3, 4
8715                 UNION
8716                 SELECT
8717                         cp.id as copy,
8718                         COUNT(circ.id),
8719                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8720                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8721                 FROM
8722                         asset.copy cp
8723                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8724                 GROUP BY 1, 3, 4
8725                 UNION
8726                 SELECT
8727                         id as copy,
8728                         circ_count,
8729                         -1 AS year,
8730                         false as is_renewal
8731                 FROM
8732                         extend_reporter.legacy_circ_count
8733         )x GROUP BY 1, 3, 4
8734
8735                 </oils_persist:source_definition>
8736         <fields>
8737             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8738             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8739             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8740             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8741         </fields>
8742                 <links>
8743                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8744                 </links>
8745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8746                         <actions>
8747                                 <retrieve/>
8748                         </actions>
8749                 </permacrud>
8750     </class>
8751
8752         <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">
8753                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8754                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8755                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8756                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8757                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8758                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8759                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8760                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8761                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8762                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8763                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8764                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8765                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8766                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8767                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8768                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8769                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8770                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8771                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8772                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8773                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8774                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8775                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8776                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8777                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8778                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8779                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8780                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8781                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8782                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8783                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8784                 </fields>
8785                 <links>
8786                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8787                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8788                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8789                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8790                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8791                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8792                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8793                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8794                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8795                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8796                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8797                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8798                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8799                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8800                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8801                 </links>
8802         </class>
8803
8804     <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">
8805         <fields oils_persist:primary="id">
8806             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8807             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8808             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8809             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8810             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8811             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8812             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8813             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8814             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8815             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8816             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8817             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8818             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8819             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8820             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8821             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8822             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8823             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8824             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8825             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8826             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8827             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8828             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8829             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8830             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8831             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8832             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8833             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8834             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8835             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8836             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8837             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8838             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8839             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8840         </fields>
8841         <links>
8842             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8843             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8844             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8845             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8846             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8847         </links>
8848     </class>
8849
8850     <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">
8851         <fields oils_persist:primary="id">
8852             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8853             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8854             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8855             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8856         </fields>
8857         <links>
8858             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8859             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8860         </links>
8861     </class>
8862
8863     <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">
8864         <fields oils_persist:primary="owning_lib">
8865             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8866             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8867             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8868         </fields>
8869         <links>
8870             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8871         </links>
8872     </class>
8873
8874     <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">
8875         <fields oils_persist:primary="id">
8876             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8877             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8878             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8879             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8880             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8881         </fields>
8882         <links>
8883             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8884             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8885             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8886         </links>
8887     </class>
8888
8889     <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">
8890         <fields oils_persist:primary="circ_lib">
8891             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8892             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8893             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8894             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8895         </fields>
8896         <links>
8897             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8898             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8899         </links>
8900     </class>
8901
8902     <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">
8903         <fields oils_persist:primary="id">
8904             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8905             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8906             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8907             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8908             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8909         </fields>
8910         <links>
8911             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8912             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8913             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8914         </links>
8915     </class>
8916
8917     <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">
8918         <fields oils_persist:primary="home_ou">
8919             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8920             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8921             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8922             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8923         </fields>
8924         <links>
8925             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8926             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8927         </links>
8928     </class>
8929         <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">
8930                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8931                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8932                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8933                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8934                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8935                 </fields>
8936                 <links>
8937                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8938                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8939                 </links>
8940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8941                         <actions>
8942                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8943                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8944                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8945                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8946                         </actions>
8947                 </permacrud>
8948         </class>
8949         <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">
8950                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8951                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8952                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8953                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8954                 </fields>
8955                 <links>
8956                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8957                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8958                         </links>
8959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8960                 <actions>
8961                                 <create permission="ADMIN_ACQ_FUND_TAG">
8962                                         <context link="tag" field="owner"/>
8963                                 </create>
8964                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8965                                         <context link="tag" field="owner"/>
8966                                 </retrieve>
8967                                 <update permission="ADMIN_ACQ_FUND_TAG">
8968                                         <context link="tag" field="owner"/>
8969                                 </update>
8970                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8971                                         <context link="tag" field="owner"/>
8972                                 </delete>
8973                         </actions>
8974                 </permacrud>
8975         </class>
8976         <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">
8977                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
8978                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8979                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
8980                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
8981                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
8982                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
8983                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8984                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
8985                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
8986                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
8987                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
8988                 </fields>
8989                 <links>
8990                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8991                 </links>
8992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8993                         <actions>
8994                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8995                                 <retrieve/>
8996                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8997                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8998                         </actions>
8999                 </permacrud>
9000         </class>
9001
9002         <!-- ********************************************************************************************************************* -->
9003
9004 </IDL>
9005
9006 <!--
9007     vim:noet:ts=4:sw=4:
9008 -->