]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Address "bouyancy" typo (should be "buoyancy")
[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" reporter:datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                 </fields>
214                 <links>
215                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
216                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
217                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
218                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
219                 </links>
220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
221                         <actions>
222                                 <create permission="CREATE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </create>
225                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </retrieve>
228                                 <update permission="UPDATE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </update>
231                                 <delete permission="DELETE_IMPORT_ITEM">
232                     <context link="definition" field="owner"/>
233                                 </delete>
234                         </actions>
235                 </permacrud>
236         </class>
237
238         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
239                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
240                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
241                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
243                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
244                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
245                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
246                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
263                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
264                 </fields>
265                 <links>
266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
267                 </links>
268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
269                         <actions>
270                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
272                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
274                         </actions>
275                 </permacrud>
276         </class>
277
278         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
279                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
280                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
282                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
283                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
284                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
285                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
286                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
287                 </fields>
288                 <links>
289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
290                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
291                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
292                 </links>
293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
294                         <actions>
295                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
296                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
297                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                         </actions>
300                 </permacrud>
301         </class>
302
303         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
304                 <fields oils_persist:primary="code">
305                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
307                 </fields>
308                 <links>
309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
310                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
311                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <retrieve/>
316                         </actions>
317                 </permacrud>
318         </class>
319
320         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
321                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
322                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
323                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
324                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
325                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
326                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
327                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
328                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
329                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
330                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
331                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
332                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
333                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
334                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
336                 </fields>
337                 <links>
338                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
339                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
340                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
341                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
342             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
343             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
344             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
360                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
361                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
362                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
363                 </fields>
364                 <links/>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
368                 <retrieve/>
369                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
370                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
371                         </actions>
372                 </permacrud>
373         </class>
374
375         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
376                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
377                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
379                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
380                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
381                 </fields>
382                 <links>
383                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
384                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
385                 </links>
386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
387                         <actions>
388                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                         </actions>
393                 </permacrud>
394         </class>
395
396         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
397                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
398                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
399                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
400                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
401                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
402                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
403                 </fields>
404                 <links>
405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
406                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
407                 </links>
408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
409                         <actions>
410                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
411                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
412                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
420                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
424                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
425                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
426                 </fields>
427                 <links>
428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
429                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
430                 </links>
431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
432                         <actions>
433                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                         </actions>
438                 </permacrud>
439         </class>
440
441         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
442                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
443                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
444                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
445                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
446                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
447                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
448                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
449                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
450                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
451                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
452                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
453                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
454                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
455                 </fields>
456                 <links>
457                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
458                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
459                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
460             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
461             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
462                 </links>
463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
464                         <actions>
465                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                         </actions>
470                 </permacrud>
471         </class>
472
473         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
474                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
478                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
479                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
480                 </fields>
481                 <links/>
482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
483                         <actions>
484                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                 <retrieve/>
486                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
488                         </actions>
489                 </permacrud>
490         </class>
491
492         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
493                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
494                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
497                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
498                 </fields>
499                 <links>
500                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
501                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
502                 </links>
503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
504                         <actions>
505                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
507                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                         </actions>
510                 </permacrud>
511         </class>
512
513         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
514                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
515                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
516                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
517                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
522                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
523                 </links>
524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525                         <actions>
526                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                         </actions>
531                 </permacrud>
532         </class>
533
534         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
535                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
536                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
538                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
539                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
540                 </fields>
541                 <links>
542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
543                 </links>
544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
545                         <actions>
546                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
550                         </actions>
551                 </permacrud>
552         </class>
553
554         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
555                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
556                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
557                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
558                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
559                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
560                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
561                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
562                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
563             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
564                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
565                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
566                 </fields>
567                 <links>
568                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
569                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
570                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
571                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </create>
578                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </retrieve>
581                                 <update permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </update>
584                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
585                     <context link="match_set" field="owner"/>
586                                 </delete>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
592                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
593                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
594                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
595                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
596                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
599                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
600                 </fields>
601                 <links>
602                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
603                 </links>
604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
605                         <actions>
606                                 <create permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </create>
609                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </retrieve>
612                                 <update permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </update>
615                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
616                     <context link="match_set" field="owner"/>
617                                 </delete>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
624                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
626                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
628                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
629                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
630                 </fields>
631                 <links>
632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
635                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
636                 </links>
637         </class>
638
639     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
640         <fields oils_persist:primary="name">
641             <field reporter:label="Name" name="name" reporter:datatype="text"/>
642             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
643             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
644             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
645         </fields>
646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647             <actions>
648                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652             </actions>
653         </permacrud>
654     </class>
655
656     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
657         <fields oils_persist:primary="id">
658             <field reporter:label="ID" name="id" reporter:datatype="id"/>
659             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
661             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
662             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
663         </fields>
664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665             <actions>
666                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <retrieve/>
668                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
670             </actions>
671         </permacrud>
672     </class>
673
674         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
675                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
676                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
678                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
679                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
680                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
681                 </fields>
682                 <links>
683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
684                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689                 <retrieve/>
690                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
692             </actions>
693         </permacrud>
694         </class>
695
696         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
697                 <fields oils_persist:primary="name">
698                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
699                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
700                         <field reporter:label="Description" name="description" reporter:datatype="text" />
701                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
702                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
703                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
704                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
705                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
707                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
708                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
709                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
710                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
711                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
712                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
713                 </fields>
714                 <links>
715                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
716                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
717                 </links>
718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
719             <actions>
720                 <create permission="ADMIN_SVF" global_required="true"/>
721                 <retrieve/>
722                 <update permission="ADMIN_SVF" global_required="true"/>
723                 <delete permission="ADMIN_SVF" global_required="true"/>
724             </actions>
725         </permacrud>
726         </class>
727
728         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
729                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
731                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
732                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
733             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
734                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
735                 </fields>
736                 <links/>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
740                 <retrieve/>
741                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
742                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
743             </actions>
744         </permacrud>
745         </class>
746
747         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
748                 <fields oils_persist:primary="id">
749                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
750                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
751                 </fields>
752                 <links>
753                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <retrieve/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
785                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
786                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
787                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
788                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
789                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
790                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
791                 </fields>
792                 <links>
793                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
794                 </links>
795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
796             <actions>
797                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
798                 <retrieve/>
799                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
800                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
801             </actions>
802         </permacrud>
803         </class>
804
805         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
806                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
807                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
808                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
809                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
810                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
811                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
812                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
813                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
814                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
815                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
816                 </fields>
817                 <links>
818                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
819                 </links>
820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
821             <actions>
822                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
823                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
824                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
825                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
826             </actions>
827         </permacrud>
828         </class>
829
830     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
831         <fields oils_persist:primary="name">
832             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
833             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
834             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
835             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
836             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
837             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
838             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
839             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
840             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
841             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
842         </fields>
843         <links>
844             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
845             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
846         </links>
847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
848             <actions>
849                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
850                 <retrieve/>
851                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
852                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
853             </actions>
854         </permacrud>
855     </class>
856
857     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
858         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
859             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
860             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
861             <field reporter:label="Name" name="name" reporter:datatype="text"/>
862             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
863             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
864             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
865             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
866         </fields>
867         <links>
868             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
869         </links>
870     </class>
871
872         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
873                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
874                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
875                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
876                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
877                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
878                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
879                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
880                 </fields>
881                 <links>
882             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
883             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
884                 </links>
885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
886                         <actions>
887                                 <retrieve/>
888                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
889                         </actions>
890                 </permacrud>
891         </class>
892
893         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
894                 <fields oils_persist:primary="key">
895                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
896                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
897                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
898                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
899                 </fields>
900                 <links/>
901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
902                         <actions>
903                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
904                                 <retrieve/>
905                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
906                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
907                         </actions>
908                 </permacrud>
909         </class>
910
911         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
912                 <fields oils_persist:primary="module">
913                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
914                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
915                 </fields>
916                 <links/>
917         </class>
918
919         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
920                 <fields oils_persist:primary="module">
921                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
922                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
923                 </fields>
924                 <links/>
925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
926                         <actions>
927                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
928                                 <retrieve/>
929                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
930                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
931                         </actions>
932                 </permacrud>
933         </class>
934
935         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
936                 <fields oils_persist:primary="module">
937                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
939                 </fields>
940                 <links/>
941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
942                         <actions>
943                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
944                                 <retrieve/>
945                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
946                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
947                         </actions>
948                 </permacrud>
949         </class>
950
951         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
952                 <fields oils_persist:primary="module">
953                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
954                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
955                 </fields>
956                 <links/>
957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
958                         <actions>
959                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
960                                 <retrieve/>
961                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
962                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
963                         </actions>
964                 </permacrud>
965         </class>
966
967         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
968                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
969                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
970                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
971                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
972                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
973                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
974                 </fields>
975                 <links>
976                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
977                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
978                 </links>
979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
980                         <actions>
981                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
982                     <context link="event_def" field="owner"/>
983                 </create>
984                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
985                     <context link="event_def" field="owner"/>
986                 </retrieve>
987                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
988                     <context link="event_def" field="owner"/>
989                 </update>
990                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
991                     <context link="event_def" field="owner"/>
992                 </delete>
993                         </actions>
994                 </permacrud>
995         </class>
996
997         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
998                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
999                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1000                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1001                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1002                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1003                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1004                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1005                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1006                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1007                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1008                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1009                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1010                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1011                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1012                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1013                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1014                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1015                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1016                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1017                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1018                 </fields>
1019                 <links>
1020                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1021                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1022                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1023                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1024                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1025                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1026                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1027                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1028                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1029                 </links>
1030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1031                         <actions>
1032                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1033                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1034                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1035                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1036                         </actions>
1037                 </permacrud>
1038         </class>
1039
1040         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1041                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1042                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1043                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1044                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1045                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1046                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1047                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1048                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1049                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1050                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1051                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1052                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1053                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1054                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1055                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1056                 </fields>
1057                 <links>
1058                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1059                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1060                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1061                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1062                 </links>
1063         </class>
1064
1065         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1066                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1067                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1068                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1069                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1070                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1071                 </fields>
1072                 <links>
1073                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1074                 </links>
1075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1076                         <actions>
1077                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1078                     <context link="event_def" field="owner"/>
1079                 </create>
1080                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1081                     <context link="event_def" field="owner"/>
1082                 </retrieve>
1083                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1084                     <context link="event_def" field="owner"/>
1085                 </update>
1086                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1087                     <context link="event_def" field="owner"/>
1088                 </delete>
1089                         </actions>
1090                 </permacrud>
1091         </class>
1092
1093         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1094                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1095                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1096                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1097                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1098                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1099                 </fields>
1100                 <links>
1101                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1102                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1103                 </links>
1104         </class>
1105
1106         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1107                 <fields oils_persist:primary="code">
1108                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1109                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1110                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1111                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1112                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1113                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1114                 </fields>
1115                 <links/>
1116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1117             <actions>
1118                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1119                 <retrieve/>
1120                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1121                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1122             </actions>
1123         </permacrud>
1124         </class>
1125
1126         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1127                 <fields oils_persist:primary="code">
1128                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1129                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1130                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1131                 </fields>
1132                 <links/>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1136                 <retrieve/>
1137                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1138                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1139             </actions>
1140         </permacrud>
1141         </class>
1142
1143         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1144                 <fields oils_persist:primary="code">
1145                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1146                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1147                 </fields>
1148                 <links/>
1149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1150             <actions>
1151                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1152                 <retrieve/>
1153                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1154                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1155             </actions>
1156         </permacrud>
1157         </class>
1158
1159         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1160                 <fields oils_persist:primary="code">
1161                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1162                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1163                 </fields>
1164                 <links/>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1170                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1176                 <fields oils_persist:primary="code">
1177                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1178                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1179                 </fields>
1180                 <links/>
1181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1182             <actions>
1183                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1184                 <retrieve/>
1185                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1186                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1187             </actions>
1188         </permacrud>
1189         </class>
1190
1191         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1192                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1193                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1194                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1195                 </fields>
1196                 <links/>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1202                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205         </class>
1206
1207         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1208                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1209                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1210                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1211                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1212                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1213                 </fields>
1214         <links>
1215             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1216             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1217             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1218         </links>
1219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1220             <actions>
1221                 <create permission="UPDATE_COPY">
1222                     <context link="target_copy" field="circ_lib"/>
1223                 </create>
1224                 <retrieve/>
1225                 <update permission="UPDATE_COPY">
1226                     <context link="target_copy" field="circ_lib"/>
1227                 </update>
1228                 <delete permission="UPDATE_COPY">
1229                     <context link="target_copy" field="circ_lib"/>
1230                 </delete>
1231             </actions>
1232         </permacrud>
1233         </class>
1234
1235         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1236                 <fields oils_persist:primary="code">
1237                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1238                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1239                 </fields>
1240                 <links/>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1246                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249         </class>
1250
1251         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1252                 <fields oils_persist:primary="code">
1253                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1254                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1255                 </fields>
1256                 <links/>
1257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1258             <actions>
1259                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1260                 <retrieve/>
1261                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1262                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1263             </actions>
1264         </permacrud>
1265         </class>
1266
1267         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1268                 <fields oils_persist:primary="code">
1269                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1270                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1271                 </fields>
1272                 <links/>
1273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1274             <actions>
1275                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1276                 <retrieve/>
1277                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1278                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1279             </actions>
1280         </permacrud>
1281         </class>
1282
1283     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1284         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1285             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1286             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1287             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1288             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1289             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1290             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1291             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1292             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1293             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1294             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1295             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1296             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1297             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1298             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1299             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1300         </fields>
1301         <links/>
1302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1303             <actions>
1304                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1305                 <retrieve/>
1306                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1307                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1308             </actions>
1309         </permacrud>
1310     </class>
1311
1312     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1313         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1314             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1315             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1316             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1317             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1318             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1319             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1320             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1321             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1322             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1323             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1324             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1325             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1326             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1327             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1328             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1329         </fields>
1330         <links/>
1331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332             <actions>
1333                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1334                 <retrieve/>
1335                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1336                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1337             </actions>
1338         </permacrud>
1339     </class>
1340
1341     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1342         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1343             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1344             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1345             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1346             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1347             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1348         </fields>
1349         <links>
1350             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1351             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1352             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1353         </links>
1354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1355             <actions>
1356                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1357                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1358                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1359                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1360             </actions>
1361         </permacrud>
1362     </class>
1363
1364         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1365                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1366                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1367                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1368                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1369                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1370                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1371                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1372                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1373                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1374                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1375                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1376                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1377                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1378                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1379                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1380                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1381                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1382             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1383                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1384                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1385                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1386                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1387                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1388                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1389                 </fields>
1390                 <links>
1391                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1392                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1393                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1394                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1395                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1396                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1397                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1398                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1399                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1400                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1401                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1402                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1403                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1404             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1405                 </links>
1406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1407             <actions>
1408                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1409                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1410                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1411                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1412             </actions>
1413         </permacrud>
1414         </class>
1415
1416         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1417                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1418                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1419                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1420                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1421                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1422                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1423                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1424                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1425                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1426                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1427                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1428                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1429                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1430                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1431                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1432             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1433                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1434                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1435             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1436                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1437                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1438                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1439                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1440             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1441             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1442             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1443                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1444                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1445                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1446                 </fields>
1447                 <links>
1448                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1449                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1450                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1451                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1452                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1453                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1454                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1455                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1456                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1457                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1458                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1459                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1460                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1461             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1462                 </links>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1466                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1467                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1468                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1469             </actions>
1470         </permacrud>
1471         </class>
1472
1473     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1474         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1475             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1476             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1477             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1478         </fields>
1479         <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1485                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488     </class>
1489
1490     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1492             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1493             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1494             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1495             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1496             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1497             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1498             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1499         </fields>
1500         <links>
1501             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1502         </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1506                 <retrieve/>
1507                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1508                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1509             </actions>
1510         </permacrud>
1511     </class>
1512
1513     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1514         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1515             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1516             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1517             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1518             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1519             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1520         </fields>
1521         <links>
1522             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1523             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1524         </links>
1525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1526             <actions>
1527                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1528                     <context link="matchpoint" field="org_unit"/>
1529                 </create>
1530                 <retrieve/>
1531                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1532                     <context link="matchpoint" field="org_unit"/>
1533                 </update>
1534                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1535                     <context link="matchpoint" field="org_unit"/>
1536                 </delete>
1537             </actions>
1538         </permacrud>
1539     </class>
1540
1541     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1542         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1543             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1544             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1545             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1546         </fields>
1547         <links>
1548             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1549             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1550         </links>
1551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1552             <actions>
1553                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1554                     <context link="limit_set" field="owning_lib"/>
1555                 </create>
1556                 <retrieve/>
1557                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1558                     <context link="limit_set" field="owning_lib"/>
1559                 </update>
1560                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1561                     <context link="limit_set" field="owning_lib"/>
1562                 </delete>
1563             </actions>
1564         </permacrud>
1565     </class>
1566
1567     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1568         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1569             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1570             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1571             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1572             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1573         </fields>
1574         <links>
1575             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1576             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1577         </links>
1578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1579             <actions>
1580                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1581                     <context link="limit_set" field="owning_lib"/>
1582                 </create>
1583                 <retrieve/>
1584                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1585                     <context link="limit_set" field="owning_lib"/>
1586                 </update>
1587                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1588                     <context link="limit_set" field="owning_lib"/>
1589                 </delete>
1590             </actions>
1591         </permacrud>
1592     </class>
1593
1594         <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">
1595                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1596                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1597                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1598                 </fields>
1599                 <links/>
1600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1601             <actions>
1602                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1603                 <retrieve/>
1604                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1605                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1606             </actions>
1607         </permacrud>
1608         </class>
1609
1610         <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">
1611                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1612                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1614                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1615                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1616                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1617                 </fields>
1618                 <links>
1619                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1620                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1621                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1622                 </links>
1623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1624             <actions>
1625                 <create permission="ADMIN_SURVEY">
1626                     <context link="survey" field="owner"/>
1627                 </create>
1628                 <retrieve/>
1629                 <update permission="ADMIN_SURVEY">
1630                     <context link="survey" field="owner"/>
1631                 </update>
1632                 <delete permission="ADMIN_SURVEY">
1633                     <context link="survey" field="owner"/>
1634                 </delete>
1635             </actions>
1636         </permacrud>
1637         </class>
1638         <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">
1639                 <fields oils_persist:primary="id" oils_persist:sequence="">
1640                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1641                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1642                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1643                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1644                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1645                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1646                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1647                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1648                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1649                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1650                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1651                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1652                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1653                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1654                 </fields>
1655                 <links>
1656                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1657                 </links>
1658         </class>
1659         <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">
1660                 <fields oils_persist:primary="id" oils_persist:sequence="">
1661                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1662                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1663                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1664                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1665                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1666                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1667                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1668                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1669                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1670                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1671                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1672                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1673                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1674                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1675                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1676                 </fields>
1677                 <links>
1678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1679                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1680                 </links>
1681         </class>
1682         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1683                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1684                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1685                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1686                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1687                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1688                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1689                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1690                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1691                 </fields>
1692                 <links>
1693                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1695                 </links>
1696         </class>
1697         <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">
1698                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1699                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1700                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1701                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1702                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1703                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1704                 </fields>
1705                 <links>
1706                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1707                 </links>
1708         </class>
1709         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1710                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1711                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1712                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1714                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1715                 </fields>
1716                 <links>
1717                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1718                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1719                 </links>
1720         </class>
1721         <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">
1722                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1723                         <field name="field" reporter:datatype="link"/>
1724                         <field name="id" reporter:datatype="id" />
1725                         <field name="source" reporter:datatype="link"/>
1726                         <field name="value" reporter:datatype="text"/>
1727                 </fields>
1728                 <links>
1729                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1730                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1731                 </links>
1732         </class>
1733         <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">
1734                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1735                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1736                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1737                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1738                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1739                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1740                 </fields>
1741                 <links>
1742                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1743                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1744                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1745                 </links>
1746         </class>
1747         <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">
1748                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1749                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1750                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1751                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1752                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1753                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1754                 </fields>
1755                 <links>
1756                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1757                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1758                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1759                 </links>
1760         </class>
1761         <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">
1762                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1763                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1764                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1765                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1766                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1767                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1768                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1769                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1770                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1771                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1772                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1773                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1774                 </fields>
1775                 <links>
1776                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1777                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1778                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1779                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1780                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1781                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1782                 </links>
1783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1784             <actions>
1785                 <create permission="TRANSIT_COPY" context_field="owner">
1786                     <context link="target_copy" field="circ_lib"/>
1787                 </create>
1788                 <retrieve/>
1789                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1790                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1791             </actions>
1792         </permacrud>
1793         </class>
1794         <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">
1795                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1796                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1797                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1798                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1799                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1800                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1801                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1802                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1803                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1804                 </fields>
1805                 <links>
1806                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1807                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1808                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1809                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1810                 </links>
1811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1812             <actions>
1813                 <create permission="ADMIN_SURVEY">
1814                     <context link="survey" field="owner"/>
1815                 </create>
1816                 <retrieve/>
1817                 <update permission="ADMIN_SURVEY">
1818                     <context link="survey" field="owner"/>
1819                 </update>
1820                 <delete permission="ADMIN_SURVEY">
1821                     <context link="survey" field="owner"/>
1822                 </delete>
1823             </actions>
1824         </permacrud>
1825         </class>
1826         <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">
1827                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1828                         <field name="bucket" />
1829                         <field name="id" reporter:datatype="id" />
1830                         <field name="target_copy" reporter:datatype="link"/>
1831                         <field name="create_time" reporter:datatype="timestamp" />
1832                         <field name="pos" reporter:datatype="int" />
1833                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1834                 </fields>
1835                 <links>
1836                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1837                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1838             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1839                 </links>
1840         </class>
1841         <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">
1842                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1843                         <field name="id" reporter:datatype="id" />
1844                         <field name="item" reporter:datatype="link"/>
1845                         <field name="note" reporter:datatype="text" />
1846                 </fields>
1847                 <links>
1848                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1849                 </links>
1850         </class>
1851
1852         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
1853                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1854                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1855                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1856                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1857                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1858                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1859                 </fields>
1860                 <links>
1861                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1862                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1863                 </links>
1864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1865                         <actions>
1866                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1867                                 <retrieve/>
1868                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1869                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1870                         </actions>
1871                 </permacrud>
1872         </class>
1873
1874         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
1875                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1876                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1877                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1878                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1879                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1880                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1881                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1882                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1883                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1884                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1885                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1886                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1887                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1888                 </fields>
1889                 <links>
1890                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1891                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1892                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1893                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1894                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1895                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1896                 </links>
1897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1898                         <actions>
1899                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1900                                 <retrieve/>
1901                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1902                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1903                         </actions>
1904                 </permacrud>
1905         </class>
1906
1907         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
1908                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1909                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1910                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1911                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1912                 </fields>
1913                 <links>
1914                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1915                 </links>
1916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1917                         <actions>
1918                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1919                                 <retrieve/>
1920                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1921                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1922                         </actions>
1923                 </permacrud>
1924         </class>
1925
1926         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
1927                 <fields oils_persist:primary="code">
1928                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1929                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1930                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1931                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1932                 </fields>
1933                 <links>
1934                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1935                 </links>
1936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1937                         <actions>
1938                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1939                                 <retrieve/>
1940                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1941                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1942                         </actions>
1943                 </permacrud>
1944         </class>
1945
1946         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
1947                 <fields oils_persist:primary="code">
1948                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1949                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1950                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1951                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1952                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1953                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1954                 </fields>
1955                 <links>
1956                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1957                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1958                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1959                 </links>
1960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1961                         <actions>
1962                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1963                                 <retrieve/>
1964                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1965                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1966                         </actions>
1967                 </permacrud>
1968         </class>
1969
1970     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
1971         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1972             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1973             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1974             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1975         </fields>
1976         <links>
1977             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1978             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1979         </links>
1980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1981             <actions>
1982                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1983                 <retrieve/>
1984                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1985                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1986             </actions>
1987         </permacrud>
1988     </class>
1989
1990         <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">
1991                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1992                         <field name="active" reporter:datatype="bool"/>
1993                         <field name="create_date" reporter:datatype="timestamp"/>
1994                         <field name="creator" />
1995                         <field name="deleted" reporter:datatype="bool"/>
1996                         <field name="edit_date" reporter:datatype="timestamp"/>
1997                         <field name="editor" />
1998                         <field name="id" reporter:datatype="id" />
1999                         <field name="last_xact_id" />
2000                         <field name="marc" />
2001                         <field name="source" />
2002                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2003                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2004                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2005                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2006                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2007                 </fields>
2008                 <links>
2009                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2010                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2011                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2012                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2013                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2014                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2015                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2016                 </links>
2017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2018                         <actions>
2019                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2020                                 <retrieve/>
2021                                 <update permission="UPDATE_MARC" global_required="true"/>
2022                                 <delete permission="UPDATE_MARC" global_required="true"/>
2023                         </actions>
2024                 </permacrud>
2025         </class>
2026         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2028                         <field name="char_encoding" />
2029                         <field name="id" />
2030                         <field name="record" />
2031                         <field name="record_status" />
2032                         <field name="thesaurus" />
2033                 </fields>
2034                 <links>
2035                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2036                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2037                 </links>
2038         </class>
2039         <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">
2040                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2041                         <field name="id" reporter:datatype="id" />
2042                         <field name="bib" reporter:datatype="link" />
2043                         <field name="authority" reporter:datatype="link" />
2044                 </fields>
2045                 <links>
2046                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2047                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2048                 </links>
2049         </class>
2050         <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">
2051                 <fields oils_persist:primary="code" oils_persist:sequence="">
2052                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2053                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2054                 </fields>
2055                 <links/>
2056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2057             <actions>
2058                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2059                 <retrieve/>
2060                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2061                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2062             </actions>
2063         </permacrud>
2064         </class>
2065         <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">
2066                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2067                         <field name="accepting_usr" />
2068                         <field name="amount" reporter:datatype="money" />
2069                         <field name="amount_collected" reporter:datatype="money" />
2070                         <field name="approval_code" reporter:datatype="text"/>
2071                         <field name="cash_drawer" reporter:datatype="link"/>
2072                         <field name="cc_first_name" reporter:datatype="text"/>
2073                         <field name="cc_last_name" reporter:datatype="text"/>
2074                         <field name="cc_number" reporter:datatype="text"/>
2075                         <field name="cc_order_number" reporter:datatype="text"/>
2076                         <field name="cc_type" reporter:datatype="text"/>
2077                         <field name="cc_processor" reporter:datatype="text"/>
2078                         <field name="expire_month" reporter:datatype="int" />
2079                         <field name="expire_year" reporter:datatype="int" />
2080                         <field name="id" reporter:datatype="id" />
2081                         <field name="note" reporter:datatype="text"/>
2082                         <field name="payment_ts" reporter:datatype="timestamp"/>
2083                         <field name="xact" reporter:datatype="link"/>
2084                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2085                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2086                 </fields>
2087                 <links>
2088                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2089                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2090                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2091                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2092                 </links>
2093         </class>
2094         <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">
2095                 <fields oils_persist:primary="name">
2096                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2097                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2098                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2099                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2100                 </fields>
2101                 <links/>
2102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2103             <actions>
2104                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2105                 <retrieve/>
2106                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2107                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2108             </actions>
2109         </permacrud>
2110         </class>
2111
2112         <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">
2113                 <fields oils_persist:primary="alias">
2114                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2115                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2116                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2117                 </fields>
2118                 <links>
2119                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2120                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2121                 </links>
2122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2123             <actions>
2124                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2125                 <retrieve/>
2126                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2127                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2128             </actions>
2129         </permacrud>
2130         </class>
2131
2132         <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">
2133                 <fields oils_persist:primary="name">
2134                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2135                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2136                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2137                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2138                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2139                 </fields>
2140                 <links>
2141                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2142                 </links>
2143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144             <actions>
2145                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2146                 <retrieve/>
2147                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2148                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2149             </actions>
2150         </permacrud>
2151         </class>
2152
2153         <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">
2154                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2155                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2156                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2157                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2158                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2159                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2160                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2161                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2162                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2163                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2164                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2165                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2166                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2167                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2168                 </fields>
2169                 <links>
2170                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2171                 </links>
2172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2173             <actions>
2174                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2175                 <retrieve/>
2176                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2177                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2178             </actions>
2179         </permacrud>
2180         </class>
2181         <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">
2182                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2183                         <field name="id" reporter:datatype="id" />
2184                         <field name="name" reporter:datatype="text"/>
2185                         <field name="xpath" reporter:datatype="text"/>
2186                         <field name="format" reporter:datatype="link"/>
2187                         <field name="first_word" reporter:datatype="bool" />
2188                 </fields>
2189                 <links/>
2190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2191             <actions>
2192                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2193                 <retrieve/>
2194                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2195                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2196             </actions>
2197         </permacrud>
2198         </class>
2199         <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">
2200                 <fields oils_persist:primary="code" oils_persist:sequence="">
2201                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2202                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2203                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2204                 </fields>
2205                 <links/>
2206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2207             <actions>
2208                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2209                 <retrieve/>
2210                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2211                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2212             </actions>
2213         </permacrud>
2214         </class>
2215         <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">
2216                 <fields oils_persist:primary="code" oils_persist:sequence="">
2217                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2218                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2219                 </fields>
2220                 <links/>
2221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2222             <actions>
2223                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2224                 <retrieve/>
2225                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2226                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2227             </actions>
2228         </permacrud>
2229         </class>
2230     <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">
2231         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2232             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2233             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2234             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2235             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2236         </fields>
2237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2238             <actions>
2239                 <retrieve/>
2240             </actions>
2241         </permacrud>
2242     </class>
2243         <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">
2244                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2245                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2246                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2247                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2248                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2249                 </fields>
2250                 <links>
2251                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2252                 </links>
2253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2254             <actions>
2255                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2256                 <retrieve/>
2257                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2258                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2259             </actions>
2260         </permacrud>
2261         </class>
2262         <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">
2263                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2264                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2265                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2266                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2267                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2268                 </fields>
2269                 <links>
2270                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2271                 </links>
2272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2273             <actions>
2274                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2275                 <retrieve/>
2276                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2277                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2278             </actions>
2279         </permacrud>
2280         </class>
2281         <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">
2282                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2283                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2284                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2286                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2287                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2288                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2289                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2290                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2291                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2292                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2293                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2294                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2295                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2296                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2297                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2298                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2299                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2300                 </fields>
2301                 <links>
2302                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2304                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2305                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2306                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2307                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2308                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2309                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2310                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2311                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2312                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2313                 </links>
2314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2315             <actions>
2316                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2317                 <retrieve/>
2318                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2319                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2325                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2326                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2327                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2328                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2329                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2330                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2332                 </fields>
2333                 <links>
2334                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2335                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2336         </links>
2337         </class>
2338         <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">
2339                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2340                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2341                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2342                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2343                 </fields>
2344                 <links>
2345                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2346                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2347                 </links>
2348         </class>
2349         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2350                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2351                         <field name="id" reporter:datatype="id" />
2352                         <field name="value" oils_persist:i18n="true" />
2353                 </fields>
2354                 <links/>
2355         </class>
2356         <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">
2357                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2358                         <field name="balance_owed" reporter:datatype="money" />
2359                         <field name="total_owed" reporter:datatype="money" />
2360                         <field name="total_paid" reporter:datatype="money" />
2361                         <field name="usr" reporter:datatype="link"/>
2362                 </fields>
2363                 <links>
2364                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2365         </links>
2366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2367             <actions>
2368                 <retrieve permission="VIEW_USER">
2369                     <context link="usr" field="home_ou"/>
2370                 </retrieve>
2371             </actions>
2372         </permacrud>
2373         </class>
2374         <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">
2375                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2376                         <field name="collector" />
2377                         <field name="enter_time" reporter:datatype="timestamp"/>
2378                         <field name="id" reporter:datatype="id" />
2379                         <field name="location" reporter:datatype="link"/>
2380                         <field name="usr" reporter:datatype="link"/>
2381                 </fields>
2382                 <links>
2383                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2384                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2385                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2386                 </links>
2387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2388             <actions>
2389                 <create permission="money.collections_tracker.create" context_field="location"/>
2390                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2391                 <delete permission="money.collections_tracker.create" context_field="location"/>
2392             </actions>
2393         </permacrud>
2394         </class>
2395         <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">
2396                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2397                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2398                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2399                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2400                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2401                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2402                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2403                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2404                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2405                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2406                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2407                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2408                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2409                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2410                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2411                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2412                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2413                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2414                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2415                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2416                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2417                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2418                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2419                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2420                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2424                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2425                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2426                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2427                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2428                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2429                 </fields>
2430                 <links>
2431                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2432                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2433                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2434                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2435                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2436                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2437                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2438                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2439                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2440                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2441                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2442                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2443                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2444                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2445                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2446                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2447                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2448                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2449                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2450                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2451                 </links>
2452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2453             <actions>
2454                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2455                 <retrieve/>
2456                 <update permission="UPDATE_MARC" global_required="true"/>
2457             </actions>
2458         </permacrud>
2459         </class>
2460         <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">
2461                 <fields oils_persist:primary="id">
2462                         <field name="dow_0_close" />
2463                         <field name="dow_0_open" />
2464                         <field name="dow_1_close" />
2465                         <field name="dow_1_open" />
2466                         <field name="dow_2_close" />
2467                         <field name="dow_2_open" />
2468                         <field name="dow_3_close" />
2469                         <field name="dow_3_open" />
2470                         <field name="dow_4_close" />
2471                         <field name="dow_4_open" />
2472                         <field name="dow_5_close" />
2473                         <field name="dow_5_open" />
2474                         <field name="dow_6_close" />
2475                         <field name="dow_6_open" />
2476                         <field name="id" reporter:datatype="id" />
2477                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2478                 </fields>
2479                 <links>
2480                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2481                 </links>
2482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2483             <actions>
2484                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2485                 <retrieve/>
2486                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2487                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2488             </actions>
2489         </permacrud>
2490         </class>
2491         <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">
2492                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2493                         <field name="id" reporter:datatype="id" />
2494                         <field name="record" reporter:datatype="link"/>
2495                         <field name="label" reporter:datatype="text"/>
2496                         <field name="label_sortkey" reporter:datatype="text"/>
2497                 </fields>
2498                 <links>
2499                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2500                 </links>
2501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2502             <actions>
2503                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2504                 <retrieve/>
2505                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2506                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2507             </actions>
2508         </permacrud>
2509         </class>
2510         <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">
2511                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2512                         <field name="id" reporter:datatype="id" />
2513                         <field name="target_copy" reporter:datatype="link" />
2514                         <field name="part" reporter:datatype="link"/>
2515                 </fields>
2516                 <links>
2517                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2518                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2519                 </links>
2520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2521             <actions>
2522                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2523                 <retrieve/>
2524                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2525                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2526             </actions>
2527         </permacrud>
2528         </class>
2529         <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">
2530                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2531                         <field name="close_end" reporter:datatype="timestamp" />
2532                         <field name="close_start" reporter:datatype="timestamp" />
2533                         <field name="id" reporter:datatype="id" />
2534                         <field name="org_unit" reporter:datatype="org_unit"/>
2535                         <field name="reason" reporter:datatype="text"/>
2536                 </fields>
2537                 <links>
2538                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2539                 </links>
2540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2541             <actions>
2542                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2543                 <retrieve/>
2544                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2545                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2546             </actions>
2547         </permacrud>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2551                         <field name="extended" reporter:datatype="interval"/>
2552                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2553                         <field name="max_renewals" reporter:datatype="int" />
2554                         <field name="name" reporter:datatype="text"/>
2555                         <field name="normal" reporter:datatype="interval"/>
2556                         <field name="shrt" reporter:datatype="interval"/>
2557                 </fields>
2558                 <links>
2559                 </links>
2560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2561             <actions>
2562                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2563                 <retrieve/>
2564                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2565                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2566             </actions>
2567         </permacrud>
2568         </class>
2569
2570         <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">
2571                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2572                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2573                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2574             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2575                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2576             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2577                 </fields>
2578                 <links>
2579             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2580                 </links>
2581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2582             <actions>
2583                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2584                 <retrieve/>
2585                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2586                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2587             </actions>
2588                 </permacrud>
2589         </class>
2590
2591         <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">
2592                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2593                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2594                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2595                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2596             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2597                 </fields>
2598                 <links>
2599                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2600                 </links>
2601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2602             <actions>
2603                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2604                 <retrieve/>
2605                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2606                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2607             </actions>
2608                 </permacrud>
2609         </class>
2610
2611         <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">
2612                 <fields oils_persist:primary="id" oils_persist:sequence="">
2613                         <field name="balance_owed" reporter:datatype="money"/>
2614                         <field name="id" reporter:datatype="id" />
2615                         <field name="last_billing_note" reporter:datatype="text"/>
2616                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2617                         <field name="last_billing_type" reporter:datatype="text"/>
2618                         <field name="last_payment_note" reporter:datatype="text"/>
2619                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2620                         <field name="last_payment_type" reporter:datatype="text"/>
2621                         <field name="total_owed" reporter:datatype="money"/>
2622                         <field name="total_paid" reporter:datatype="money"/>
2623                         <field name="usr" reporter:datatype="link"/>
2624                         <field name="xact_finish" reporter:datatype="timestamp" />
2625                         <field name="xact_start" reporter:datatype="timestamp" />
2626                         <field name="xact_type" reporter:datatype="text"/>
2627                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2628                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2629                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2630                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2631                         <field name="billing_location" reporter:datatype="link"/>
2632                 </fields>
2633                 <links>
2634                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2635                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2636                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2637                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2638                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2639                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2640                 </links>
2641         </class>
2642         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2643                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2644                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2645                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2646                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2647                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2648                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2649                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2650                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2651                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2652                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2653                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2655                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2656                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2657                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2658                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2659                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2660                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2661                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2662                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2663                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2664                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2665                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2666                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2667                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2668                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2669                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2670                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2671                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2672                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2673                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2674                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2675                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2676                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2677                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2678                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2679                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2680                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2681                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2682                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2683                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2684                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2685                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2686                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2687                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2688                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2689                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2690                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2691                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2692                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2693                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2694                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2695                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2697                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2701                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2702                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2703                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2705                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2706                 </fields>
2707                 <links>
2708                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2709                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2710                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2711                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2712                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2713                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2714                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2715                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2716                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2717                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2718                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2719                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2720                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2721                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2722                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2723                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2724                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2725                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2726                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2727                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2728                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2729                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2730                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2731                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2732                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2733                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2734                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2735                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2736                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2737                 </links>
2738         </class>
2739
2740         <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">
2741                 <fields oils_persist:primary="name">
2742                         <field name="name" reporter:datatype="text"/>
2743                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2744                 </fields>
2745                 <links/>
2746                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2747                         <actions>
2748                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2749                                 <retrieve/>
2750                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2751                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2752                         </actions>
2753                 </permacrud>
2754         </class>
2755         <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">
2756                 <fields oils_persist:primary="name">
2757                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2758                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2759                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2760                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2761                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2762                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2763                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2764                 </fields>
2765                 <links>
2766                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2767                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2768                 </links>
2769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2770                         <actions>
2771                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2772                                 <retrieve/>
2773                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2774                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2775                         </actions>
2776                 </permacrud>
2777         </class>
2778         <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">
2779                 <fields oils_persist:primary="name">
2780                         <field name="name" reporter:datatype="text"/>
2781                         <field name="label" reporter:datatype="text"/>
2782                         <field name="description" reporter:datatype="text"/>
2783                         <field name="datatype" reporter:datatype="text"/>
2784                         <field name="view_perm" reporter:datatype="link"/>
2785                         <field name="update_perm" reporter:datatype="link"/>
2786                         <field name="fm_class" reporter:datatype="text"/>
2787                         <field name="grp" reporter:datatype="link"/>
2788                 </fields>
2789                 <links>
2790                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2791                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2792                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2793                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2794                 </links>
2795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2796                         <actions>
2797                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2798                                 <retrieve/>
2799                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2800                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2801                         </actions>
2802                 </permacrud>
2803         </class>
2804         <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">
2805                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2806                         <field name="id" />
2807                         <field name="name"  reporter:datatype="text"/>
2808                         <field name="org_unit" reporter:datatype="org_unit"/>
2809                         <field name="value"  reporter:datatype="text"/>
2810                 </fields>
2811                 <links>
2812                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2813                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2814                 </links>
2815         </class>
2816         <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">
2817                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2818                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2819                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2820                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2821                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2822                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2823                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2824                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2825                 </fields>
2826                 <links>
2827                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2828                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2829                 </links>
2830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2831             <actions>
2832                 <create permission="CREATE_COPY_NOTE">
2833                     <context link="owning_copy" field="circ_lib"/>
2834                 </create>
2835                 <retrieve permission="VIEW_COPY_NOTES">
2836                     <context link="owning_copy" field="circ_lib"/>
2837                 </retrieve>
2838                 <update permission="UPDATE_COPY_NOTE">
2839                     <context link="owning_copy" field="circ_lib"/>
2840                 </update>
2841                 <delete permission="DELETE_COPY_NOTE">
2842                     <context link="owning_copy" field="circ_lib"/>
2843                 </delete>
2844             </actions>
2845         </permacrud>
2846         </class>
2847         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2848                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2849                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2850                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2851                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2852                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2853                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2854                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2855                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2856                 </fields>
2857                 <links>
2858                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2859                 </links>
2860         </class>
2861         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2862                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2863                         <field name="fingerprint"  reporter:datatype="text"/>
2864                         <field name="id" reporter:datatype="id" />
2865                         <field name="master_record" reporter:datatype="link"/>
2866                         <field name="mods"  reporter:datatype="text"/>
2867                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2868                 </fields>
2869                 <links>
2870                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2871                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2872                 </links>
2873         </class>
2874         <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">
2875                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2876                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2877                         <field name="name"  reporter:datatype="text"/>
2878                 </fields>
2879                 <links/>
2880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2881             <actions>
2882                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2883                 <retrieve/>
2884                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2885                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2886             </actions>
2887         </permacrud>
2888         </class>
2889         <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">
2890                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2891                         <field name="code"  reporter:datatype="text"/>
2892                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2893                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2894                 </fields>
2895                 <links/>
2896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2897             <actions>
2898                 <create permission="CREATE_PERM" global_required="true"/>
2899                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2900                 <update permission="UPDATE_PERM" global_required="true"/>
2901                 <delete permission="DELETE_PERM" global_required="true"/>
2902             </actions>
2903         </permacrud>
2904         </class>
2905         <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">
2906                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2907                         <field name="id" reporter:datatype="id" />
2908                         <field name="metarecord" reporter:datatype="link"/>
2909                         <field name="source" reporter:datatype="link"/>
2910                 </fields>
2911                 <links>
2912                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2913                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2914                 </links>
2915         </class>
2916         <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">
2917                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2918                         <field name="id" reporter:datatype="id" />
2919                         <field name="field" reporter:datatype="link"/>
2920                         <field name="source" reporter:datatype="link"/>
2921                         <field name="value"  reporter:datatype="text"/>
2922                 </fields>
2923                 <links>
2924                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2925                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2926                 </links>
2927         </class>
2928         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
2929                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
2930                         <field name="id" reporter:datatype="id" />
2931                         <field name="value" reporter:datatype="text"/>
2932                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2933                 </fields>
2934                 <links>
2935                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
2936                 </links>
2937         </class>
2938         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
2939                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
2940                         <field name="id" reporter:datatype="id" />
2941                         <field name="entry" reporter:datatype="link"/>
2942                         <field name="def" reporter:datatype="link"/>
2943                         <field name="source" reporter:datatype="link"/>
2944                 </fields>
2945                 <links>
2946                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
2947                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
2948                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2949                 </links>
2950         </class>
2951         <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">
2952                 <oils_persist:source_definition>
2953                         SELECT * FROM metabib.author_field_entry
2954                                                 UNION ALL
2955                         SELECT * FROM metabib.keyword_field_entry
2956                                                 UNION ALL
2957                         SELECT * FROM metabib.identifier_field_entry
2958                                                 UNION ALL
2959                         SELECT * FROM metabib.title_field_entry
2960                                                 UNION ALL
2961                         SELECT * FROM metabib.subject_field_entry
2962                                                 UNION ALL
2963                         SELECT * FROM metabib.series_field_entry
2964                 </oils_persist:source_definition>
2965                 <fields>
2966                         <field name="field" reporter:datatype="link"/>
2967                         <field name="id" reporter:datatype="id" />
2968                         <field name="source" reporter:datatype="link"/>
2969                         <field name="value"  reporter:datatype="text"/>
2970                 </fields>
2971                 <links>
2972                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2973                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2974                 </links>
2975         </class>
2976         <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">
2977                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2978                         <field name="field" reporter:datatype="link"/>
2979                         <field name="id" reporter:datatype="id" />
2980                         <field name="source" reporter:datatype="link"/>
2981                         <field name="value"  reporter:datatype="text"/>
2982                 </fields>
2983                 <links>
2984                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2985                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2986                 </links>
2987         </class>
2988         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2989                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2990                         <field name="accepting_usr" reporter:datatype="link"/>
2991                         <field name="amount" reporter:datatype="money" />
2992                         <field name="amount_collected" reporter:datatype="money" />
2993                         <field name="cash_drawer" reporter:datatype="link"/>
2994                         <field name="id" reporter:datatype="id" />
2995                         <field name="note"  reporter:datatype="text"/>
2996                         <field name="payment_ts" reporter:datatype="timestamp"/>
2997                         <field name="xact" reporter:datatype="link"/>
2998                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2999                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3000                 </fields>
3001                 <links>
3002                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3003                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3004                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3005                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3006                 </links>
3007         </class>
3008         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3009                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3010                         <field name="accepting_usr" reporter:datatype="link"/>
3011                         <field name="amount" reporter:datatype="money" />
3012                         <field name="amount_collected" reporter:datatype="money" />
3013                         <field name="id" reporter:datatype="id" />
3014                         <field name="note"  reporter:datatype="text"/>
3015                         <field name="payment_ts" reporter:datatype="timestamp"/>
3016                         <field name="xact" reporter:datatype="link"/>
3017                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3018                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3019                 </fields>
3020                 <links>
3021                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3022                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3023                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3024                 </links>
3025         </class>
3026         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3027                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3028                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3029                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3030                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3031                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3032                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3033                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3034                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3035                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3036                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3037                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3038                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3039                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3040                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3041                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3042                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3043                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3044                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3045                 </fields>
3046                 <links>
3047                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3048                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3049                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3050                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3051                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3052                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3053                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3054                 </links>
3055         </class>
3056
3057         <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">
3058                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3059                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3060                         <field name="name"  reporter:datatype="text"/>
3061                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3062                         <field name="block_list" reporter:datatype="text"/>
3063                         <field name="staff_alert" reporter:datatype="bool"/>
3064                         <field name="org_depth" reporter:datatype="int"/>
3065                 </fields>
3066                 <links/>
3067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3068             <actions>
3069                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3070                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3071                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3072                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3073             </actions>
3074         </permacrud>
3075         </class>
3076         <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">
3077                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3078                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3079                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3080                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3081                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3082                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3083                 </fields>
3084                 <links>
3085                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3086                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3087                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3088         </links>
3089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3090             <actions>
3091                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3092                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3093                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3094                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3095             </actions>
3096         </permacrud>
3097         </class>
3098         <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">
3099                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3100                         <field name="holdable" reporter:datatype="bool"/>
3101                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3102                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3103                         <field name="opac_visible" reporter:datatype="bool"/>
3104             <field name="copy_active" reporter:datatype="bool"/>
3105             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3106                 </fields>
3107                 <links/>
3108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3109             <actions>
3110                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3111                 <retrieve/>
3112                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3113                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3114             </actions>
3115         </permacrud>
3116         </class>
3117         <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">
3118                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3119                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3120                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3121                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3122                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3123                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3124                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3125                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3126                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3127                 </fields>
3128                 <links>
3129                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3130                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3131                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3132                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3133                 </links>
3134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3135                         <actions>
3136                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3137                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3138                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3139                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3140                         </actions>
3141                 </permacrud>
3142         </class>
3143         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3144                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3145                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3146                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3147                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3148                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3149                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3150                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3151                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3152                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3153                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3154                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3155                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3156                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3157                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3158                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3159                 </fields>
3160                 <links>
3161                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3162                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3163                 </links>
3164         </class>
3165         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3166                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3167                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3168                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3169                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3170                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3171                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3172                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3173                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3174                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3175                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3176                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3177                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3178                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3179                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3180                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3181                 </fields>
3182                 <links>
3183                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3184                 </links>
3185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3186                         <actions>
3187                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3188                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3189                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3190                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3191                         </actions>
3192                 </permacrud>
3193         </class>
3194
3195
3196         <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">
3197                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3198                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3199                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3200                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3201                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3202                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3203                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3204                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3205                 </fields>
3206                 <links>
3207                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3208                 </links>
3209         </class>
3210
3211         <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">
3212                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3213                         <field name="call_number" />
3214                         <field name="create_date" reporter:datatype="timestamp"/>
3215                         <field name="creator" reporter:datatype="link"/>
3216                         <field name="id" reporter:datatype="id" />
3217                         <field name="pub" reporter:datatype="bool"/>
3218                         <field name="title"  reporter:datatype="text"/>
3219                         <field name="value"  reporter:datatype="text"/>
3220                 </fields>
3221                 <links>
3222                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3223                 </links>
3224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3225             <actions>
3226                 <create permission="CREATE_VOLUME_NOTE">
3227                     <context link="call_number" field="owning_lib"/>
3228                 </create>
3229                 <retrieve permission="VIEW_VOLUME_NOTES">
3230                     <context link="call_number" field="owning_lib"/>
3231                 </retrieve>
3232                 <update permission="UPDATE_VOLUME_NOTE">
3233                     <context link="call_number" field="owning_lib"/>
3234                 </update>
3235                 <delete permission="DELETE_VOLUME_NOTE">
3236                     <context link="call_number" field="owning_lib"/>
3237                 </delete>
3238             </actions>
3239         </permacrud>
3240         </class>
3241         <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">
3242                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3243                         <field name="create_date" reporter:datatype="timestamp"/>
3244                         <field name="creator" reporter:datatype="link"/>
3245                         <field name="edit_date" reporter:datatype="timestamp"/>
3246                         <field name="editor" reporter:datatype="link"/>
3247                         <field name="id" reporter:datatype="id" />
3248                         <field name="record" reporter:datatype="link"/>
3249                         <field name="value" reporter:datatype="text"/>
3250                 </fields>
3251                 <links>
3252                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3253                 </links>
3254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3255             <actions>
3256                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3257                 <retrieve/>
3258                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3259                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3260             </actions>
3261         </permacrud>
3262         </class>
3263         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3264         <oils_persist:source_definition>
3265 SELECT  usr,
3266         SUM(
3267             CASE
3268                 WHEN (
3269                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3270                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3271                 ) THEN 1
3272                 ELSE 0
3273             END
3274         ) AS out,
3275
3276         SUM(
3277             CASE
3278                 WHEN (
3279                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3280                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3281                 ) THEN 1
3282                 ELSE 0
3283             END
3284         ) AS overdue,
3285
3286         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3287         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3288         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3289   FROM  action.circulation
3290   WHERE checkin_time IS NULL
3291   GROUP BY 1
3292         </oils_persist:source_definition>
3293         <fields oils_persist:primary="usr">
3294             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3295             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3296             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3297             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3298             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3299             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3300         </fields>
3301         <links>
3302             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3303         </links>
3304         </class>
3305         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3306         <oils_persist:source_definition>
3307 SELECT  usr,
3308         ARRAY_TO_STRING(ARRAY_ACCUM(
3309             CASE
3310                 WHEN (
3311                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3312                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3313                 ) THEN id
3314                 ELSE 0
3315             END
3316         ),',') AS out,
3317
3318         ARRAY_TO_STRING(ARRAY_ACCUM(
3319             CASE
3320                 WHEN (
3321                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3322                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3323                 ) THEN id
3324                 ELSE 0
3325             END
3326         ),',') AS overdue,
3327
3328         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3329         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3330         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3331   FROM  action.circulation
3332   WHERE checkin_time IS NULL
3333   GROUP BY 1
3334         </oils_persist:source_definition>
3335         <fields oils_persist:primary="usr">
3336             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3337             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3338             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3339             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3340             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3341             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3342         </fields>
3343         <links>
3344             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3345         </links>
3346         </class>
3347         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3348                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3349                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3350                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3351                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3352                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3353                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3354                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3355                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3356                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3357                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3358                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3359                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3360                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3361                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3362                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3363                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3364                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3365                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3366                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3367                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3368                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3369                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3370                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3371                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3372                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3373                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3374                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3375                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3376                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3377                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3378                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3379                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3383                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3384                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3385                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3386                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3387                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3388                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3389                 </fields>
3390                 <links>
3391                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3392                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3393                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3394                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3395                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3396                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3397                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3398                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3399                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3400                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3401                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3402                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3403                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3404                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3405                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3406                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3407                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3408                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3409                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3410                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3411                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3412                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3413                 </links>
3414         </class>
3415         <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">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3417                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3418                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3419                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3420                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3421                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3422                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3423                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3424                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3425                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3426                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3427                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3428                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3429                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3430                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3431                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3432                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3433                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3434                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3435                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3436                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3437                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3438                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3439                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3440                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3441                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3442                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3443                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3444                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3445                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3446                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3447                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3448                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3449                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3450                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3451                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3452                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3453                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3454                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3455                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3456                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3457                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3458                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3459                 </fields>
3460                 <links>
3461                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3462                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3463                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3464                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3465                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3466                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3467                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3468                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3469                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3470                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3471                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3472                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3473                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3474                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3475                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3476                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3477                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3478                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3479                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3480                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3481                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3482                 </links>
3483         </class>
3484         <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">
3485                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3486                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3487                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3488                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3489                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3490                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3491                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3492                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3493                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3494                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3495                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3496                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3497                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3498                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3499                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3500                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3501                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3502                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3503                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3504                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3505                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3506                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3507                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3508                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3509                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3510                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3511                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3512                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3513                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3514                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3515                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3516                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3517                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3518                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3519                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3520                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3521                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3522                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3523                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3524                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3525                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3526                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3527                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3528                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3529                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3530                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3531                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3532                 </fields>
3533                 <links>
3534                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3535                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3536                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3537                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3538                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3539                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3540                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3541                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3542                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3543                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3544                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3545                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3546                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3547                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3548                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3549                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3550                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3551                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3552                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3553                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3554                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3555                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3556                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3557                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3558                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3559                 </links>
3560         </class>
3561
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3564                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3565                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3566                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3567                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3568                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3569                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3570                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3571                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3572                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3573                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3574                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3575                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3576                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3577                 </fields>
3578                 <links>
3579                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3580                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3581                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3582                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3583                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3584                 </links>
3585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3586                         <actions>
3587                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3588                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3589                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3590                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3591                         </actions>
3592                 </permacrud>
3593         </class>
3594
3595         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3596                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3597                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3598                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3599                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3600                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3601                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3602                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3603                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3604                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3605                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3607                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3608                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3609                 </fields>
3610                 <links>
3611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3612                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3613                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3614                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3615                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3616                 </links>
3617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3618                         <actions>
3619                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3620                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3621                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3622                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3623                         </actions>
3624                 </permacrud>
3625         </class>
3626         
3627         <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">
3628                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3629                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3630                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3631                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3632                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3633                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3634                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3636                 </fields>
3637                 <links>
3638                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3639                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3640                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3641                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3642                 </links>
3643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3644                         <actions>
3645                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3646                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3647                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3648                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3649                         </actions>
3650                 </permacrud>
3651         </class>
3652         
3653         <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">
3654                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3655                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3656                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3657                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3658                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3659                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3660                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3661                 </fields>
3662                 <links>
3663                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3664                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3665                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3666                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3667                 </links>
3668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3669                         <actions>
3670                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3671                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3672                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3673                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3674                         </actions>
3675                 </permacrud>
3676         </class>
3677         
3678         <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">
3679                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3680                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3681                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3682                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3683                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3684                 </fields>
3685                 <links>
3686                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3687                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3688                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3689                 </links>
3690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3691                         <actions>
3692                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3693                     <context link="resource" field="owner" />
3694                 </create>
3695                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3696                     <context link="resource" field="owner" />
3697                 </retrieve>
3698                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3699                     <context link="resource" field="owner" />
3700                 </update>
3701                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3702                     <context link="resource" field="owner" />
3703                 </delete>
3704                         </actions>
3705                 </permacrud>
3706         </class>
3707         
3708         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3709                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3710                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3711                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3712                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3713                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3714                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3715                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3716                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3717                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3718                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3719                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3720                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3721                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3722                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3723                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3724                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3725                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3726                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3727                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3728                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3729                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3730                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3731                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3732                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3733                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3734                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3735                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3736                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3737                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3738                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3739                 </fields>
3740                 <links>
3741                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3742                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3743                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3744                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3745                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3746                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3747                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3748                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3749                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3750                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3751                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3752                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3753                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3754                 </links>
3755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3756                         <actions>
3757                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3758                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3759                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3760                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3761                         </actions>
3762                 </permacrud>
3763         </class>
3764         
3765         <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">
3766                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3767                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3768                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3769                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3770                 </fields>
3771                 <links>
3772                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3773                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3774                 </links>
3775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3776                         <actions>
3777                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3778                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3779                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3780                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3781                         </actions>
3782                 </permacrud>
3783         </class>
3784
3785         <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">
3786                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3787                         <field name="bucket" reporter:datatype="link"/>
3788                         <field name="id" reporter:datatype="id" />
3789                         <field name="target_call_number" reporter:datatype="link" />
3790                         <field name="create_time" reporter:datatype="timestamp" />
3791                         <field name="pos" reporter:datatype="int" />
3792                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3793                 </fields>
3794                 <links>
3795                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3796                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3797             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3798                 </links>
3799         </class>
3800         <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">
3801                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3802                         <field name="id" reporter:datatype="id" />
3803                         <field name="item" reporter:datatype="link"/>
3804                         <field name="note" reporter:datatype="text" />
3805                 </fields>
3806                 <links>
3807                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3808                 </links>
3809         </class>
3810         <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">
3811                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3812                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3813                         <field name="btype" reporter:datatype="text"/>
3814                         <field name="id" reporter:datatype="id" />
3815                         <field name="name" reporter:datatype="text"/>
3816                         <field name="description" reporter:datatype="text"/>
3817                         <field name="owner" reporter:datatype="link"/>
3818                         <field name="pub" reporter:datatype="bool"/>
3819                         <field name="create_time" reporter:datatype="timestamp" />
3820                 </fields>
3821                 <links>
3822                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3823                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3824                 </links>
3825         </class>
3826         <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">
3827                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3828                         <field name="id" reporter:datatype="id" />
3829                         <field name="bucket" reporter:datatype="link"/>
3830                         <field name="note" reporter:datatype="text" />
3831                 </fields>
3832                 <links>
3833                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3834                 </links>
3835         </class>
3836         <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">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3838                         <field name="hold" reporter:datatype="link"/>
3839                         <field name="id" reporter:datatype="id" />
3840                         <field name="target_copy" reporter:datatype="link"/>
3841                 </fields>
3842                 <links>
3843                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3844                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3845                 </links>
3846         </class>
3847         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3848                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3849                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3850                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3851                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3852                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3853                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3854                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3855                 </fields>
3856                 <links>
3857                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3858                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3859                 </links>
3860         </class>
3861         <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">
3862                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3863                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3864                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3865                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3866                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3867                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3868                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3869                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3870                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3871                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3872                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3873                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3874                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
3875                 </fields>
3876                 <links>
3877                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3878                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3879                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3880                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3881                 </links>
3882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883             <actions>
3884                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3885                 <retrieve/>
3886                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3887                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3888             </actions>
3889         </permacrud>
3890         </class>
3891
3892     <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">
3893         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3894             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3895             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3896             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3897             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3898         </fields>
3899         <links>
3900             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3901             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3902         </links>
3903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3904             <actions>
3905                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3906                 <retrieve/>
3907                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3908                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3909             </actions>
3910         </permacrud>
3911     </class>
3912
3913         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3914                 <fields>
3915                         <field name="sre_id" oils_persist:virtual="true" />
3916                         <field name="location" oils_persist:virtual="true" />
3917                         <field name="owning_lib" oils_persist:virtual="true" />
3918                         <field name="basic_holdings" oils_persist:virtual="true" />
3919                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3920                         <field name="supplement_holdings" oils_persist:virtual="true" />
3921                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3922                         <field name="index_holdings" oils_persist:virtual="true" />
3923                         <field name="index_holdings_add" oils_persist:virtual="true" />
3924                         <field name="online" oils_persist:virtual="true" />
3925                         <field name="missing" oils_persist:virtual="true" />
3926                         <field name="incomplete" oils_persist:virtual="true" />
3927                 </fields>
3928         </class>
3929
3930         <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">
3931                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3932                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3933                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3934                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3935                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3936                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3937                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3938                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3939                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3940                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3941                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3942                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3943                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3944                 </fields>
3945                 <links>
3946                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3947                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3948                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3949                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3950                 </links>
3951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952                         <actions>
3953                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3954                                 <retrieve/>
3955                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3956                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3957                         </actions>
3958                 </permacrud>
3959         </class>
3960
3961         <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">
3962                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3963                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3964                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3965                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3966                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3967                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3968                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3969                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3970                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3971                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3972                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3973                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3974                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3975                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3976                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3977                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3978                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3979                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3980                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3981                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3982                 </fields>
3983                 <links>
3984                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3985                 </links>
3986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3987                         <actions>
3988                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3989                                         <context link="subscription" field="owning_lib" />
3990                                 </create>
3991                                 <retrieve />
3992                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3993                                         <context link="subscription" field="owning_lib" />
3994                                 </update>
3995                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3996                                         <context link="subscription" field="owning_lib" />
3997                                 </delete>
3998                         </actions>
3999                 </permacrud>
4000         </class>
4001
4002         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4003                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4004                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4005                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4006                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4007                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4008                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4009                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4010                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4011                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4012                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4013                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4014                 </fields>
4015                 <links>
4016                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4017                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4018                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4019                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4020                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4021                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4022                 </links>
4023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4024                         <actions>
4025                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4026                                 <retrieve />
4027                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4028                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4029                         </actions>
4030                 </permacrud>
4031         </class>
4032
4033         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4034                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4035                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4036                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4037                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4038                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4039                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4040                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4041                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4042                 </fields>
4043                 <links>
4044                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4045                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4046                 </links>
4047         </class>
4048
4049         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4050                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4051                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4052                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4053                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4054                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4055                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4056                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4057                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4058                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4059                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4060                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4061                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4062                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4063                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4064                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4065                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4066                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4067                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4068                 </fields>
4069                 <links>
4070                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4071                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4072                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4073                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4074                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4075                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4076                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4077                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4078                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4079                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4080                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4081                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4082                 </links>
4083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4084                         <actions>
4085                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4086                                 <retrieve />
4087                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4088                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4089                         </actions>
4090                 </permacrud>
4091         </class>
4092
4093         <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">
4094                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4095                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4096                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4097                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4098                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4099                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4100                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4101                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4102                 </fields>
4103                 <links>
4104                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4105                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4106                 </links>
4107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4108                         <actions>
4109                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4110                                         <context link="distribution" field="holding_lib" />
4111                                 </create>
4112                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4113                                         <context link="distribution" field="holding_lib" />
4114                                 </retrieve>
4115                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4116                                         <context link="distribution" field="holding_lib" />
4117                                 </update>
4118                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4119                                         <context link="distribution" field="holding_lib" />
4120                                 </delete>
4121                         </actions>
4122                 </permacrud>
4123         </class>
4124
4125         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4126                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4127                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4128                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4129                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4130                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4131                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4132                 </fields>
4133                 <links>
4134                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4135                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4136                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4137                 </links>
4138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4139                         <actions>
4140                                 <create permission="ADMIN_SERIAL_STREAM">
4141                                         <context link="distribution" field="holding_lib" />
4142                                 </create>
4143                                 <retrieve />
4144                                 <update permission="ADMIN_SERIAL_STREAM">
4145                                         <context link="distribution" field="holding_lib" />
4146                                 </update>
4147                                 <delete permission="ADMIN_SERIAL_STREAM">
4148                                         <context link="distribution" field="holding_lib" />
4149                                 </delete>
4150                         </actions>
4151                 </permacrud>
4152         </class>
4153
4154         <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">
4155                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4156                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4157                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4158                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4159                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4160                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4161                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4162                 </fields>
4163                 <links>
4164                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4165                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4166                 </links>
4167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4168                         <actions>
4169                                 <create permission="ADMIN_SERIAL_STREAM">
4170                                         <context link="stream" jump="distribution" field="holding_lib" />
4171                                 </create>
4172                                 <retrieve permission="RECEIVE_SERIAL">
4173                                         <context link="stream" jump="distribution" field="holding_lib" />
4174                                 </retrieve>
4175                                 <update permission="ADMIN_SERIAL_STREAM">
4176                                         <context link="stream" jump="distribution" field="holding_lib" />
4177                                 </update>
4178                                 <delete permission="ADMIN_SERIAL_STREAM">
4179                                         <context link="stream" jump="distribution" field="holding_lib" />
4180                                 </delete>
4181                         </actions>
4182                 </permacrud>
4183         </class>
4184
4185         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4186                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4187                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4188                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4189                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4190                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4191                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4192                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4193                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4194                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4195                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4196                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4197                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4198                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4199                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4200                 </fields>
4201                 <links>
4202                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4203                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4204                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4205                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4206                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4207                 </links>
4208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4209                         <actions>
4210                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4211                                         <context link="subscription" field="owning_lib" />
4212                                 </create>
4213                                 <retrieve/>
4214                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4215                                         <context link="subscription" field="owning_lib" />
4216                                 </update>
4217                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4218                                         <context link="subscription" field="owning_lib" />
4219                                 </delete>
4220                         </actions>
4221                 </permacrud>
4222         </class>
4223
4224         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4226                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4227                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4228                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4229                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4230                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4231                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4232                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4233                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4234                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4235                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4236                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4237                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4238                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4239                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4240                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4241                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4242                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4243                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4244                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4245                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4246                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4247                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4248                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4249                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4250                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4251                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4252                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4253                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4254                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4255                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4256                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4257                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4258                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4259                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4260                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4261                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4262                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4263                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4264                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4265                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4266                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4267                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4268                 </fields>
4269                 <links>
4270                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4271                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4272                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4273                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4274                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4275                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4276                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4277                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4278                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4279                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4280                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4281                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4282                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4283                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4284                 </links>
4285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4286                         <actions>
4287                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4288                                 <retrieve/>
4289                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4290                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4291                         </actions>
4292                 </permacrud>
4293         </class>
4294
4295         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4296                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4297                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4298                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4299                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4300                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4301                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4302                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4303                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4304                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4305                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4306                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4307                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4308                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4309                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4310                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4311                 </fields>
4312                 <links>
4313                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4314                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4315                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4316                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4317                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4318                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4319                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4320                 </links>
4321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4322                         <actions>
4323                                 <create permission="ADMIN_SERIAL_ITEM">
4324                                         <context link="stream" jump="distribution" field="holding_lib" />
4325                                 </create>
4326                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4327                                         <context link="stream" jump="distribution" field="holding_lib" />
4328                                 </retrieve>
4329                                 <update permission="ADMIN_SERIAL_ITEM">
4330                                         <context link="stream" jump="distribution" field="holding_lib" />
4331                                 </update>
4332                                 <delete permission="ADMIN_SERIAL_ITEM">
4333                                         <context link="stream" jump="distribution" field="holding_lib" />
4334                                 </delete>
4335                         </actions>
4336                 </permacrud>
4337         </class>
4338
4339         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4340                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4341                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4342                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4343                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4344                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4345                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4346                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4347                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4348                 </fields>
4349                 <links>
4350                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4351                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4352                 </links>
4353                 <!-- Not available via PCRUD at this time -->
4354         </class>
4355
4356         <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">
4357                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4358                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4359                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4360                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4361                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4362                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4363                 </fields>
4364                 <links>
4365                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4366                 </links>
4367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4368                         <actions>
4369                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4370                                         <context link="distribution" field="holding_lib" />
4371                                 </create>
4372                                 <retrieve/>
4373                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4374                                         <context link="distribution" field="holding_lib" />
4375                                 </update>
4376                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4377                                         <context link="distribution" field="holding_lib" />
4378                                 </delete>
4379                         </actions>
4380                 </permacrud>
4381         </class>
4382
4383         <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">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4385                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4386                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4387                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4388                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4389                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4390                 </fields>
4391                 <links>
4392                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4393                 </links>
4394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4395                         <actions>
4396                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4397                                         <context link="distribution" field="holding_lib" />
4398                                 </create>
4399                                 <retrieve/>
4400                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4401                                         <context link="distribution" field="holding_lib" />
4402                                 </update>
4403                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4404                                         <context link="distribution" field="holding_lib" />
4405                                 </delete>
4406                         </actions>
4407                 </permacrud>
4408         </class>
4409
4410         <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">
4411                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4412                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4413                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4414                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4415                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4416                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4417                 </fields>
4418                 <links>
4419                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4420                 </links>
4421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4422                         <actions>
4423                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4424                                         <context link="distribution" field="holding_lib" />
4425                                 </create>
4426                                 <retrieve/>
4427                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4428                                         <context link="distribution" field="holding_lib" />
4429                                 </update>
4430                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4431                                         <context link="distribution" field="holding_lib" />
4432                                 </delete>
4433                         </actions>
4434                 </permacrud>
4435         </class>
4436
4437         <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">
4438                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4439                         <field name="id" reporter:datatype="id" />
4440                         <field name="owning_copy" reporter:datatype="link"/>
4441                         <field name="stat_cat" reporter:datatype="link"/>
4442                         <field name="stat_cat_entry" reporter:datatype="link"/>
4443                 </fields>
4444                 <links>
4445                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4446                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4447                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4448                 </links>
4449         </class>
4450         <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">
4451                 <fields oils_persist:primary="code">
4452                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4453                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4454                 </fields>
4455                 <links/>
4456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4457             <actions>
4458                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4459                 <retrieve/>
4460                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4461                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4462             </actions>
4463         </permacrud>
4464         </class>
4465         <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">
4466                 <fields oils_persist:primary="code">
4467                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4468                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4469                 </fields>
4470                 <links/>
4471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4472             <actions>
4473                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4474                 <retrieve/>
4475                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4476                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4477             </actions>
4478         </permacrud>
4479         </class>
4480         <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">
4481                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4482                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4483                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4484                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4485                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4486                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4487                 </fields>
4488                 <links>
4489             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4490         </links>
4491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4492             <actions>
4493                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4494                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4495                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4496                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4497             </actions>
4498         </permacrud>
4499         </class>
4500         <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">
4501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4502                         <field name="id" reporter:datatype="id" />
4503                         <field name="name" reporter:datatype="text"/>
4504                 </fields>
4505                 <links/>
4506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4507             <actions>
4508                 <create permission="CREATE_LASSO" global_required="true"/>
4509                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4510                 <update permission="UPDATE_LASSO" global_required="true"/>
4511                 <delete permission="DELETE_LASSO" global_required="true"/>
4512             </actions>
4513         </permacrud>
4514         </class>
4515         <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">
4516                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4517                         <field name="id" reporter:datatype="id" />
4518                         <field name="lasso" reporter:datatype="link"/>
4519                         <field name="org_unit" reporter:datatype="org_unit"/>
4520                 </fields>
4521                 <links>
4522                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4523                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4524                 </links>
4525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4526             <actions>
4527                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4528                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4529                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4530                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4531             </actions>
4532         </permacrud>
4533         </class>
4534         <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">
4535                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4536                         <field name="id" reporter:datatype="id" />
4537                         <field name="from_org" reporter:datatype="org_unit"/>
4538                         <field name="to_org" reporter:datatype="org_unit"/>
4539                         <field name="prox" reporter:datatype="int" />
4540                 </fields>
4541                 <links>
4542                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4543                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4544                 </links>
4545         </class>
4546         <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">
4547                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4548                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4549                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4550                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4551                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4552                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4553                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4554                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4555                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4556                 </fields>
4557                 <links/>
4558         </class>
4559         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4560                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4561                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4562                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4563                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4564                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4565                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4566                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4567                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4568                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4569                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4570                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4571                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4572                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4573                 </fields>
4574                 <links>
4575                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4576                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4577                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4578                 </links>
4579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4580             <actions>
4581                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4582                 <retrieve/>
4583                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4584                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4585             </actions>
4586         </permacrud>
4587         </class>
4588         <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">
4589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4590                         <field name="address_type"  reporter:datatype="text"/>
4591                         <field name="city"  reporter:datatype="text"/>
4592                         <field name="country"  reporter:datatype="text"/>
4593                         <field name="county"  reporter:datatype="text"/>
4594                         <field name="id" reporter:datatype="id" />
4595                         <field name="org_unit" reporter:datatype="org_unit"/>
4596                         <field name="post_code"  reporter:datatype="text"/>
4597                         <field name="state"  reporter:datatype="text"/>
4598                         <field name="street1"  reporter:datatype="text"/>
4599                         <field name="street2"  reporter:datatype="text"/>
4600                         <field name="valid" reporter:datatype="bool"/>
4601                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4602                 </fields>
4603                 <links>
4604                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4605                 </links>
4606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4607             <actions>
4608                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4609                 <retrieve/>
4610                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4611                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4612             </actions>
4613         </permacrud>
4614         </class>
4615         <!-- A note: Please update alhr when updating ahr -->
4616         <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">
4617                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4618                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4619                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4620                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4621                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4622                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4623                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4624                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4625                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4626                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4627                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4628                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4629                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4630                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4631                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4632                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4633                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4634                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4635                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4636                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4637                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4638                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4639                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4640                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4641                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4642                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4643                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4644                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4645                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4646                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4647                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4648                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4649                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4650                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4651                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4652                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4653                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4654                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4655                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4656                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4657                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4658                 </fields>
4659                 <links>
4660                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4661                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4662                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4663                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4664                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4665                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4666                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4667                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4668                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4669                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4670                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4671                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4672                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4673                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4674                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4675                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4676                 </links>
4677         </class>
4678         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4679                 <oils_persist:source_definition>
4680                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
4681                 </oils_persist:source_definition>
4682                 <fields oils_persist:primary="id">
4683                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4684                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4685                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4686                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4687                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4688                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4689                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4690                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4691                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4692                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4693                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4694                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4695                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4696                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4697                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4698                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4699                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4700                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4701                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4702                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4703                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4704                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4705                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4706                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4707                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4708                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4710                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4711                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4712                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4713                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4715                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4716                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4717                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4718                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4719                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4720                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4721                 </fields>
4722                 <links>
4723                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4724                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4725                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4726                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4727                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4728                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4729                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4730                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4731                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4732                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4733                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4734                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4735                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4736                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4737                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4738                 </links>
4739         </class>
4740
4741         <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">
4742                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4743                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4744                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4745                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4746                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4747                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4748                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4749                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4750                 </fields>
4751                 <links>
4752                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4753                 </links>
4754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755                         <actions>
4756                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4757                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4758                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4759                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4760                         </actions>
4761                 </permacrud>
4762         </class>
4763         <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">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4765                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4766                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4767                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4768                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4769                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4770                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4771                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4772                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4773                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4774                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4775                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4776                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4777                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4778                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4779                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4780                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4781                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4782                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4783                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4784                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4785                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4786                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4787                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4788                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4789                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4790                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4791                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4792                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4793                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4794                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4795                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4796                 </fields>
4797                 <links>
4798                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4799                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4800                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4801                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4802                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4803                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4804                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4805                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4806                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4807                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4808                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4809                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4810                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4811                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4812                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4813                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4814                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4815                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4816                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4817                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4818                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4819                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4820                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4821                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4822                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4823                 </links>
4824         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4825             <actions>
4826                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4827                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4828                     <context field="id"/>
4829                     <context field="parent_ou"/>
4830                                 </retrieve>
4831                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4832                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4833             </actions>
4834         </permacrud>
4835         </class>
4836         <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">
4837                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4838                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4839                         <field name="btype" reporter:datatype="text"/>
4840                         <field name="id" reporter:datatype="id" />
4841                         <field name="name"  reporter:datatype="text"/>
4842                         <field name="description" reporter:datatype="text"/>
4843                         <field name="owner" reporter:datatype="link"/>
4844                         <field name="pub" reporter:datatype="bool"/>
4845                         <field name="create_time" reporter:datatype="timestamp" />
4846                 </fields>
4847                 <links>
4848                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4849                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4850                 </links>
4851         </class>
4852         <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">
4853                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4854                         <field name="id" reporter:datatype="id" />
4855                         <field name="bucket" reporter:datatype="link"/>
4856                         <field name="note" reporter:datatype="text" />
4857                 </fields>
4858                 <links>
4859                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4860                 </links>
4861         </class>
4862         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4863                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4864                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4865                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4866                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4867                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4868                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4869                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4870                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4871                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4872                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4873                 </fields>
4874                 <links>
4875                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4876                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4877                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4878                 </links>
4879         </class>
4880         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4881                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4882                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4883                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4884                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4885                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4886                 </fields>
4887                 <links>
4888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4889                 </links>
4890         </class>
4891     <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">
4892         <fields oils_persist:primary="field">
4893             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4894             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4895             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4896         </fields>
4897         <links/>
4898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4899             <actions>
4900                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4901                 <retrieve />
4902                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4903                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4904             </actions>
4905         </permacrud>
4906     </class>
4907         <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">
4908                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4909                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4910                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4911                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4912                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4913                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4914                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4915                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4916                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4917                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4918                 </fields>
4919                 <links>
4920                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4921                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4922                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4923                 </links>
4924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4925             <actions>
4926                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4927                 <retrieve />
4928                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4929                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4930             </actions>
4931         </permacrud>
4932         </class>
4933         <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">
4934                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4935                         <field name="field" reporter:datatype="link"/>
4936                         <field name="id" reporter:datatype="id" />
4937                         <field name="source" reporter:datatype="link"/>
4938                         <field name="value"  reporter:datatype="text"/>
4939                 </fields>
4940                 <links>
4941                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4942                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4943                 </links>
4944         </class>
4945         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4946                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4947                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4948                         <field name="btype" reporter:datatype="text"/>
4949                         <field name="id" reporter:datatype="id" />
4950                         <field name="name"  reporter:datatype="text"/>
4951                         <field name="description" reporter:datatype="text"/>
4952                         <field name="owner" reporter:datatype="link"/>
4953                         <field name="pub" reporter:datatype="bool"/>
4954                         <field name="create_time" reporter:datatype="timestamp" />
4955                 </fields>
4956                 <links>
4957                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4958                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4959                 </links>
4960         </class>
4961         <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">
4962                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4963                         <field name="id" reporter:datatype="id" />
4964                         <field name="bucket" reporter:datatype="link"/>
4965                         <field name="note" reporter:datatype="text" />
4966                 </fields>
4967                 <links>
4968                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4969                 </links>
4970         </class>
4971         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4972                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4973                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4974                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4975                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4976                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4977                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4978                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4979                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4980                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4981                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4982                 </fields>
4983                 <links>
4984                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4985                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4986                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4987                 </links>
4988         </class>
4989         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4991                         <field name="id" reporter:datatype="id" />
4992                         <field name="ind1" />
4993                         <field name="ind2" />
4994                         <field name="record" />
4995                         <field name="subfield" />
4996                         <field name="tag" />
4997                         <field name="value" />
4998                 </fields>
4999                 <links>
5000                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5001                 </links>
5002         </class>
5003         <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">
5004                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5005                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5006                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5007                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5008                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5009                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5010                 </fields>
5011                 <links>
5012                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5013                 </links>
5014         </class>
5015         <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">
5016                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5017                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5018                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5019                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5020                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5021                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5022                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5023                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5024                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5025                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5026                 </fields>
5027                 <links>
5028                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5029                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5030                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5031                 </links>
5032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5033             <actions>
5034                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5035                 <retrieve/>
5036                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5037                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5038             </actions>
5039         </permacrud>
5040         </class>
5041         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5042                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5043                         <field name="create_date" reporter:datatype="timestamp"/>
5044                         <field name="creator" reporter:datatype="link"/>
5045                         <field name="edit_date" reporter:datatype="timestamp"/>
5046                         <field name="editor" reporter:datatype="link"/>
5047                         <field name="id" reporter:datatype="id" />
5048                         <field name="pub" reporter:datatype="bool"/>
5049                         <field name="record" reporter:datatype="link"/>
5050                         <field name="value"  reporter:datatype="text"/>
5051                 </fields>
5052                 <links>
5053                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5054                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5055                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5056                 </links>
5057         </class>
5058         <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">
5059                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5060                         <field name="balance_owed" reporter:datatype="money" />
5061                         <field name="total_owed" reporter:datatype="money" />
5062                         <field name="total_paid" reporter:datatype="money" />
5063                         <field name="usr" reporter:datatype="link"/>
5064                 </fields>
5065                 <links>
5066                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5067                 </links>
5068         </class>
5069         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5070                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5071                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5072                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5073                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5074                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5075                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5076                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5077                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5078                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5079                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5080                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5081                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5082                 </fields>
5083                 <links>
5084                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5085                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5086                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5087                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5088                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5089                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5090                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5091                 </links>
5092         </class>
5093         <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">
5094                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5095                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5096                         <field name="quality" reporter:datatype="int" />
5097                         <field name="source" reporter:datatype="text"/>
5098                         <field name="transcendant" reporter:datatype="bool"/>
5099                         <field name="can_have_copies" reporter:datatype="bool"/>
5100                 </fields>
5101                 <links/>
5102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5103             <actions>
5104                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5105                 <retrieve/>
5106                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5107                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5108             </actions>
5109         </permacrud>
5110         </class>
5111         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5112                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5113                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5114                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5115                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5116                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5117                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5118                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5119                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5120                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5121                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5122                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5123                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5124                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5125                 </fields>
5126                 <links>
5127                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5128                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5129                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5130                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5131                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5132                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5133                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5134                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5135                 </links>
5136         </class>
5137         <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">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5139                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5140                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5141                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5142                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5143                 </fields>
5144                 <links>
5145                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5146                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5147                 </links>
5148         </class>
5149         <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">
5150                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5151                         <field name="bucket" reporter:datatype="link"/>
5152                         <field name="id" reporter:datatype="id" />
5153                         <field name="target_user" reporter:datatype="link"/>
5154                         <field name="create_time" reporter:datatype="timestamp" />
5155                         <field name="pos" reporter:datatype="int" />
5156                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5157                 </fields>
5158                 <links>
5159                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5160                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5161             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5162                 </links>
5163         </class>
5164         <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">
5165                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5166                         <field name="id" reporter:datatype="id" />
5167                         <field name="item" reporter:datatype="link"/>
5168                         <field name="note" reporter:datatype="text" />
5169                 </fields>
5170                 <links>
5171                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5172                 </links>
5173         </class>
5174         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5175                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5176                         <field name="balance_owed" reporter:datatype="money" />
5177                         <field name="total_owed" reporter:datatype="money" />
5178                         <field name="total_paid" reporter:datatype="money" />
5179                         <field name="usr" reporter:datatype="link"/>
5180                 </fields>
5181                 <links>
5182                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5183                 </links>
5184         </class>
5185         <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">
5186                 <fields oils_persist:primary="code" oils_persist:sequence="">
5187                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5188                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5189                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5190                 </fields>
5191                 <links/>
5192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5193             <actions>
5194                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5195                 <retrieve/>
5196                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5197                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5198             </actions>
5199         </permacrud>
5200         </class>
5201         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5202                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5203                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5204                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5205                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5206                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5207                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5208                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5209                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5210                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5211                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5212                 </fields>
5213                 <links>
5214                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5215                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5216                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5217                 </links>
5218         </class>
5219         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5220                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5221                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5222                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5223                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5224                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5225                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5226                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5227                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5228                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5229                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5230                 </fields>
5231                 <links>
5232                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5233                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5234                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5235                 </links>
5236         </class>
5237         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5238                 <fields oils_persist:primary="id" oils_persist:sequence="">
5239                         <field name="checkin_lib" reporter:datatype="link"/>
5240                         <field name="checkin_staff" reporter:datatype="link"/>
5241                         <field name="checkin_time" reporter:datatype="timestamp"/>
5242                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5243                         <field name="circ_staff" reporter:datatype="link"/>
5244                         <field name="desk_renewal" reporter:datatype="bool"/>
5245                         <field name="due_date" reporter:datatype="timestamp"/>
5246                         <field name="duration" reporter:datatype="interval"/>
5247                         <field name="duration_rule" reporter:datatype="link"/>
5248                         <field name="fine_interval" reporter:datatype="interval"/>
5249                         <field name="id" reporter:datatype="id" />
5250                         <field name="max_fine" reporter:datatype="money" />
5251                         <field name="max_fine_rule" reporter:datatype="link"/>
5252                         <field name="opac_renewal" reporter:datatype="bool"/>
5253                         <field name="phone_renewal" reporter:datatype="bool"/>
5254                         <field name="recurring_fine" reporter:datatype="money" />
5255                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5256                         <field name="renewal_remaining" reporter:datatype="int" />
5257             <field name="grace_period" reporter:datatype="interval" />
5258                         <field name="stop_fines" reporter:datatype="text"/>
5259                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5260                         <field name="target_copy" reporter:datatype="link"/>
5261                         <field name="usr" reporter:datatype="link"/>
5262                         <field name="xact_finish" reporter:datatype="timestamp" />
5263                         <field name="xact_start" reporter:datatype="timestamp" />
5264                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5265                 </fields>
5266                 <links>
5267                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5268                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5269                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5270                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5271                 </links>
5272         </class>
5273         <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">
5274                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5275                         <field name="field" reporter:datatype="link"/>
5276                         <field name="id" reporter:datatype="id" />
5277                         <field name="source" reporter:datatype="link"/>
5278                         <field name="value" reporter:datatype="text"/>
5279                 </fields>
5280                 <links>
5281                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5282                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5283                 </links>
5284         </class>
5285         <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">
5286                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5287                         <field name="high" reporter:datatype="money" />
5288                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5289                         <field name="low" reporter:datatype="money" />
5290                         <field name="name" reporter:datatype="text"/>
5291                         <field name="normal" reporter:datatype="money" />
5292                         <field name="recurrence_interval" reporter:datatype="interval"/>
5293             <field name="grace_period" reporter:datatype="interval" />
5294                 </fields>
5295                 <links/>
5296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5297             <actions>
5298                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5299                 <retrieve/>
5300                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5301                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5302             </actions>
5303         </permacrud>
5304         </class>
5305         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5306                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5307                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5308                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5309                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5310                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5311                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5312                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5313                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5314                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5315                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5316                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5318                 </fields>
5319                 <links>
5320                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5321                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5322                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5323                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5324                 </links>
5325         </class>
5326         <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">
5327                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5328                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5329                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5330                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5331                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5332                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5333                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5334                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5335                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5336                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5337                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5338                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5339                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5340                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5341                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5342                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5343                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5344                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5345                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5346                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5347                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5348                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5349                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5350                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5351                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5352                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5353                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5354                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5355                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5356                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5357                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5358                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5359                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5360                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5361                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5362                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5363                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5364                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5365                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5366                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5367                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5368                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5369                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5370                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5371                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5372                 </fields>
5373                 <links>
5374                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5375                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5376                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5377                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5378                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5379                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5380                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5381                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5382                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5383                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5384                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5385                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5386                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5387                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5388                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5389                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5390                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5391                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5392                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5393                 </links>
5394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5395             <actions>
5396                 <create permission="CREATE_COPY">
5397                     <context link="call_number" field="owning_lib"/>
5398                 </create>
5399                 <retrieve/>
5400                 <update permission="UPDATE_COPY">
5401                     <context link="call_number" field="owning_lib"/>
5402                 </update>
5403                 <delete permission="DELETE_COPY">
5404                     <context link="call_number" field="owning_lib"/>
5405                 </delete>
5406             </actions>
5407         </permacrud>
5408         </class>
5409
5410         <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">
5411                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5412                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5413                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5414                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5415                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5416                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5417                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5418                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5419                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5420                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5421                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5422                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5423                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5424                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5425                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5426                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5427                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5428                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5429                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5430                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5431                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5432                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5433                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5434                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5435                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5436                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5437                 </fields>
5438                 <links>
5439                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5440                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5441                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5442                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5443                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5444                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5445                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5446                 </links>
5447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5448                         <actions>
5449                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5450                                 <retrieve />
5451                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5452                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5453                         </actions>
5454                 </permacrud>
5455         </class>
5456
5457         <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">
5458                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5459                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5460                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5461                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5462                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5463                 </fields>
5464                 <links/>
5465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5466             <actions>
5467                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5468                 <retrieve/>
5469                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5470                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5471             </actions>
5472         </permacrud>
5473         </class>
5474         <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">
5475                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5476                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5477                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5478                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5479                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5480                 </fields>
5481                 <links/>
5482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5483             <actions>
5484                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5485                 <retrieve/>
5486                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5487                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5488             </actions>
5489         </permacrud>
5490         </class>
5491         <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">
5492                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5493                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5494                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5495                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5496                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5497                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5498                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5499                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5500                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5501                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5502                 </fields>
5503                 <links>
5504                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5505                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5506                 </links>
5507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5508             <actions>
5509                 <create permission="CREATE_PERM" global_required="true"/>
5510                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5511                 <update permission="UPDATE_PERM" global_required="true"/>
5512                 <delete permission="DELETE_PERM" global_required="true"/>
5513             </actions>
5514         </permacrud>
5515         </class>
5516         <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">
5517                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5518                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5519                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5520                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5521                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5522                 </fields>
5523                 <links>
5524                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5525                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5526                 </links>
5527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5528             <actions>
5529                 <create permission="ADMIN_SURVEY">
5530                     <context link="question" jump="survey" field="owner"/>
5531                 </create>
5532                 <retrieve/>
5533                 <update permission="ADMIN_SURVEY">
5534                     <context link="question" jump="survey" field="owner"/>
5535                 </update>
5536                 <delete permission="ADMIN_SURVEY">
5537                     <context link="question" jump="survey" field="owner"/>
5538                 </delete>
5539             </actions>
5540         </permacrud>
5541         </class>
5542         <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">
5543                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5544                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5545                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5546                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5547                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5548                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5549                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5550                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5551                 </fields>
5552                 <links>
5553                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5554                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5555                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5556                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5557                 </links>
5558         </class>
5559         <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">
5560                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5561                         <field name="balance_owed" reporter:datatype="money" />
5562                         <field name="total_owed" reporter:datatype="money" />
5563                         <field name="total_paid" reporter:datatype="money" />
5564                         <field name="usr" reporter:datatype="link"/>
5565                 </fields>
5566                 <links>
5567                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5568                 </links>
5569         </class>
5570         <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">
5571                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5572                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5573                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5574                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5575                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5576                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5577                 </fields>
5578                 <links>
5579                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5580                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5581                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5582                 </links>
5583         </class>
5584         <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">
5585                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5586                         <field name="field" reporter:datatype="link"/>
5587                         <field name="id" reporter:datatype="id" />
5588                         <field name="source" reporter:datatype="link"/>
5589                         <field name="value" reporter:datatype="text"/>
5590                 </fields>
5591                 <links>
5592                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5593                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5594                 </links>
5595         </class>
5596         <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">
5597                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5598                         <field name="field" reporter:datatype="link"/>
5599                         <field name="id" reporter:datatype="id" />
5600                         <field name="source" reporter:datatype="link"/>
5601                         <field name="value" reporter:datatype="text"/>
5602                 </fields>
5603                 <links>
5604                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5605                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5606                 </links>
5607         </class>
5608         <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">
5609                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5610                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5611                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5612                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5613                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5614                 </fields>
5615                 <links>
5616                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5617                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5618                 </links>
5619         </class>
5620         <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">
5621                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5622                         <field name="depth" reporter:datatype="int" />
5623                         <field name="grantable" reporter:datatype="bool"/>
5624                         <field name="grp" reporter:datatype="link"/>
5625                         <field name="id" reporter:datatype="id" />
5626                         <field name="perm" reporter:datatype="link"/>
5627                 </fields>
5628                 <links>
5629                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5630                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5631                 </links>
5632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5633             <actions>
5634                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5635                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5636                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5637                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5638             </actions>
5639         </permacrud>
5640         </class>
5641         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5642                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5643                         <field name="items" oils_persist:virtual="true" />
5644                         <field name="btype" reporter:datatype="text"/>
5645                         <field name="id" reporter:datatype="id" />
5646                         <field name="name" reporter:datatype="text"/>
5647                         <field name="description" reporter:datatype="text"/>
5648                         <field name="owner" reporter:datatype="link"/>
5649                         <field name="pub" reporter:datatype="bool"/>
5650                         <field name="create_time" reporter:datatype="timestamp" />
5651                 </fields>
5652                 <links>
5653                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5654                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5655                 </links>
5656         </class>
5657         <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">
5658                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5659                         <field name="id" reporter:datatype="id" />
5660                         <field name="bucket" reporter:datatype="link"/>
5661                         <field name="note" reporter:datatype="text" />
5662                 </fields>
5663                 <links>
5664                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5665                 </links>
5666         </class>
5667         <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">
5668                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5669                         <field name="id" reporter:datatype="int" />
5670                         <field name="usr" reporter:datatype="link"/>
5671                         <field name="work_ou" reporter:datatype="link"/>
5672                 </fields>
5673                 <links>
5674                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5675                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5676                 </links>
5677         </class>
5678         <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">
5679                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5680                         <field name="depth" reporter:datatype="int"/>
5681                         <field name="grantable" reporter:datatype="bool"/>
5682                         <field name="id" reporter:datatype="id" />
5683                         <field name="perm" reporter:datatype="link"/>
5684                         <field name="usr" reporter:datatype="link"/>
5685                 </fields>
5686                 <links>
5687                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5688                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5689                 </links>
5690         </class>
5691         <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">
5692                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5693                         <field name="object_id" reporter:datatype="text"/>
5694                         <field name="grantable" reporter:datatype="bool"/>
5695                         <field name="id" reporter:datatype="id" />
5696                         <field name="perm" reporter:datatype="link"/>
5697                         <field name="usr" reporter:datatype="link"/>
5698                         <field name="object_type" reporter:datatype="text"/>
5699                 </fields>
5700                 <links>
5701                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5702                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5703                 </links>
5704         </class>
5705         <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">
5706                 <fields oils_persist:primary="id" oils_persist:sequence="">
5707                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5708                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5709                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5710                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5711                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5712                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5713                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5714                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5715                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5716                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5717                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5718                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5719                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5720                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5721                 </fields>
5722                 <links>
5723                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5724                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5725                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5726                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5727                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5728                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5729                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5730                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5731                 </links>
5732         </class>
5733         <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">
5734                 <fields oils_persist:primary="id" oils_persist:sequence="">
5735                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5736                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5737                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5738                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5739                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5740                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5741                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5742                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5743                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5744                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5745                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5746                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5747                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5748                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5749                 </fields>
5750                 <links>
5751                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5752                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5753                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5754                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5755                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5756                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5757                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5758                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5759                 </links>
5760         </class>
5761         <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">
5762                 <fields oils_persist:primary="id" oils_persist:sequence="">
5763                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5764                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5765                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5766                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5767                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5768                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5769                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5770                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5771                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5772                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5773                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5774                 </fields>
5775                 <links>
5776                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5777                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5778                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5779                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5780                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5781                 </links>
5782         </class>
5783         <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">
5784                 <fields oils_persist:primary="id" oils_persist:sequence="">
5785                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5786                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5787                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5788                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5789                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5790                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5791                         <field reporter:label="Accepting User" name="accepting_usr" />
5792                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5793                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5794                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5795                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5797                 </fields>
5798                 <links>
5799                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5800                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5801                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5802                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5803                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5804                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5805                 </links>
5806         </class>
5807         <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">
5808                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5809                         <field name="bucket" reporter:datatype="link"/>
5810                         <field name="id" reporter:datatype="id" />
5811                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5812                         <field name="create_time" reporter:datatype="timestamp" />
5813                         <field name="pos" reporter:datatype="int" />
5814                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5815                 </fields>
5816                 <links>
5817                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5818                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5819             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5820                 </links>
5821         </class>
5822         <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">
5823                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5824                         <field name="id" reporter:datatype="id" />
5825                         <field name="item" reporter:datatype="link"/>
5826                         <field name="note" reporter:datatype="text" />
5827                 </fields>
5828                 <links>
5829                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5830                 </links>
5831         </class>
5832         <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">
5833                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5834                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5835                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5836                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5837                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5838                 </fields>
5839                 <links>
5840                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5841                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5842                 </links>
5843         </class>
5844     <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">
5845         <fields oils_persist:primary="field">
5846             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5847             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5848             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5849         </fields>
5850         <links/>
5851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5852             <actions>
5853                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5854                 <retrieve />
5855                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5856                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5857             </actions>
5858         </permacrud>
5859     </class>
5860         <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">
5861                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5862                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5863                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5864                 </fields>
5865                 <links/>
5866         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5867             <actions>
5868                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5869                 <retrieve/>
5870                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5871                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5872             </actions>
5873         </permacrud>
5874         </class>
5875
5876
5877         <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">
5878                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5879                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5880                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5881                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5882                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5883                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5884                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5885                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5886                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5887                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5889                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5890                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5891                 </fields>
5892                 <links>
5893                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5894                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5895                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5896                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5897                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5898                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5899                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5900                 </links>
5901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5902             <actions>
5903                 <create permission="TRANSIT_COPY">
5904                     <context link="target_copy" field="owner"/>
5905                 </create>
5906                 <retrieve/>
5907                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5908                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5909             </actions>
5910         </permacrud>
5911         </class>
5912         <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">
5913                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5914                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5915                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5916                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5917                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5918                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5919                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5920                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5921                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5922                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5923                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5924                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5925                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5926                 </fields>
5927                 <links>
5928                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5929                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5930                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5931                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5932                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5933                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5934                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5935                 </links>
5936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5937             <actions>
5938                 <create permission="TRANSIT_COPY" context_field="owner">
5939                     <context link="target_copy" field="circ_lib"/>
5940                 </create>
5941                 <retrieve/>
5942                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5943                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5944             </actions>
5945         </permacrud>
5946         </class>
5947         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5948                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5949                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5950                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5951                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5952                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5953                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5954                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5955                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5956                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5957                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5958                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5959                 </fields>
5960                 <links>
5961                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5962                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5963                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5964                 </links>
5965         </class>
5966         <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">
5967                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5968                         <field name="grp" />
5969                         <field name="id" reporter:datatype="id" />
5970                         <field name="usr" />
5971                 </fields>
5972                 <links>
5973                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5974                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5975                 </links>
5976         </class>
5977         <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">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5979                         <field name="id" reporter:datatype="id" />
5980                         <field name="fq_field" reporter:datatype="text"/>
5981                         <field name="identity_value" reporter:datatype="text"/>
5982                         <field name="translation" reporter:datatype="text"/>
5983                         <field name="string" reporter:datatype="text"/>
5984                 </fields>
5985                 <links>
5986                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5987                 </links>
5988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5989             <actions>
5990                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5991                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5992                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5993                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5994             </actions>
5995         </permacrud>
5996         </class>
5997         <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">
5998                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5999                         <field name="id" reporter:datatype="id" />
6000                         <field name="fm_class" reporter:datatype="text"/>
6001                         <field name="field" reporter:datatype="text"/>
6002                         <field name="owner" reporter:datatype="org_unit"/>
6003                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6004                 </fields>
6005                 <links>
6006                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6007                 </links>
6008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6009             <actions>
6010                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6011                 <retrieve/>
6012                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6013                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6014             </actions>
6015         </permacrud>
6016         </class>
6017         <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">
6018                 <fields oils_persist:primary="code">
6019                         <field name="code" reporter:datatype="id" />
6020                         <field name="marc_code" reporter:datatype="text"/>
6021                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6022                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6023                 </fields>
6024                 <links/>
6025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6026             <actions>
6027                 <create permission="CREATE_LOCALE" global_required="true"/>
6028                 <retrieve/>
6029                 <update permission="UPDATE_LOCALE" global_required="true"/>
6030                 <delete permission="DELETE_LOCALE" global_required="true"/>
6031             </actions>
6032         </permacrud>
6033         </class>
6034         <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">
6035                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6036                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6037                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6038                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6039             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6040                 </fields>
6041                 <links>
6042                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6043                 </links>
6044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045             <actions>
6046                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6047                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6048                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6049                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6050             </actions>
6051         </permacrud>
6052         </class>
6053
6054         <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">
6055                 <fields oils_persist:primary="id">
6056                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6057                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6058                 </fields>
6059                 <links/>
6060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6061             <actions>
6062                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6063                 <retrieve/>
6064                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6065                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6066             </actions>
6067         </permacrud>
6068         </class>
6069
6070         <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">
6071                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6072                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6073                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6074                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6075                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6076                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6077                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6078                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6079                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6080                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6081                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6082                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6083                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6084                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6085                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6086                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6087                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6088                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6089                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6090                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6091                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6092                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6093                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6094                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6095                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6096                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6097                 </fields>
6098                 <links>
6099                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6100                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6101                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6102                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6103                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6104                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6105                 </links>
6106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6107             <actions>
6108                 <create permission="user_request.create">
6109                     <context link="usr" field="home_ou"/>
6110                                 </create>
6111                 <retrieve permission="user_request.view">
6112                     <context link="usr" field="home_ou"/>
6113                                 </retrieve>
6114                 <update permission="user_request.update">
6115                     <context link="usr" field="home_ou"/>
6116                                 </update>
6117                 <delete permission="user_request.delete">
6118                     <context link="usr" field="home_ou"/>
6119                                 </delete>
6120             </actions>
6121         </permacrud>
6122         </class>
6123
6124         <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">
6125                 <fields oils_persist:primary="code">
6126                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6127                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6128                 </fields>
6129                 <links/>
6130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6131             <actions>
6132                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6133                 <retrieve/>
6134                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6135                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6136             </actions>
6137         </permacrud>
6138         </class>
6139
6140         <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">
6141                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6142                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6143                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6144                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6145                         <field reporter:label="Ratio" name="ratio" />
6146                 </fields>
6147                 <links>
6148                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6149                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6150                 </links>
6151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6152                         <actions>
6153                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6154                                 <retrieve/>
6155                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6156                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6157                         </actions>
6158                 </permacrud>
6159         </class>
6160
6161         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6162                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6163                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6164                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6165                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6166                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6167                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6168                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6169                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6170                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6171                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6172                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6173                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6174                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6175                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6176                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6177                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6178                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6179                 </fields>
6180                 <links>
6181                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6182                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6183             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6184             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6185             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6186                 </links>
6187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6188             <actions>
6189                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6190                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6191                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6192                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6193             </actions>
6194         </permacrud>
6195         </class>
6196
6197         <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">
6198                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6199                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6200                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6201                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6202                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6203                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6204                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6205                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6206                 </fields>
6207                 <links>
6208                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6209                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6210                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6211                 </links>
6212         </class>
6213
6214         <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">
6215                 <fields oils_persist:primary="code">
6216                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6217                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6218                 </fields>
6219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6220             <actions>
6221                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6222                 <retrieve/>
6223                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6224                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6225             </actions>
6226                 </permacrud>
6227         </class>
6228
6229         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6230                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6231                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6232                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6233                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6234                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6235                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6236                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6237                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6238                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6239                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6240                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6241                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6242                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6243                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6244                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6245                 </fields>
6246                 <links>
6247                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6248                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6249                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6250                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6251                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6252                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6253                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6254                 </links>
6255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6256             <actions>
6257                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6258                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6259                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6260                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6261             </actions>
6262         </permacrud>
6263         </class>
6264
6265         <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">
6266                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6267                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6268                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6269                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6270                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6271                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6272                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6273                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6274                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6275                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6276                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6277                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6278                 </fields>
6279                 <links>
6280                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6281                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6282                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6283                 </links>
6284         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6285             <actions>
6286                 <create   permission="ADMIN_INVOICE">
6287                                         <context link="invoice" field="receiver"/>
6288                                 </create>
6289                 <retrieve permission="ADMIN_INVOICE">
6290                                         <context link="invoice" field="receiver"/>
6291                                 </retrieve>
6292                 <update   permission="ADMIN_INVOICE">
6293                                         <context link="invoice" field="receiver"/>
6294                                 </update>
6295                                 <delete   permission="ADMIN_INVOICE">
6296                                         <context link="invoice" field="receiver"/>
6297                                 </delete>
6298             </actions>
6299         </permacrud>
6300         </class>
6301
6302         <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">
6303                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6304                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6305                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6306                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6307                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6308                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6309                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6310                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6311                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6312                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6313                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6314                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6315                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6316                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6317                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6318                 </fields>
6319                 <links>
6320                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6321                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6322                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6323                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6324                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6325                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6326                 </links>
6327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6328             <actions>
6329                 <create   permission="ADMIN_INVOICE">
6330                                         <context link="invoice" field="receiver"/>
6331                                 </create>
6332                 <retrieve permission="ADMIN_INVOICE">
6333                                         <context link="invoice" field="receiver"/>
6334                                 </retrieve>
6335                 <update   permission="ADMIN_INVOICE">
6336                                         <context link="invoice" field="receiver"/>
6337                                 </update>
6338                                 <delete   permission="ADMIN_INVOICE">
6339                                         <context link="invoice" field="receiver"/>
6340                                 </delete>
6341             </actions>
6342         </permacrud>
6343         </class>
6344
6345         <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">
6346                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6347                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6348                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6349                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6350                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6351                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6352                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6353                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6354                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6355                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6356                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6357                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6358                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6359                 </fields>
6360                 <links>
6361                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6362                 </links>
6363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6364             <actions>
6365                 <create permission="ADMIN_PROVIDER">
6366                     <context link="provider" field="owner"/>
6367                 </create>
6368                 <retrieve permission="ADMIN_PROVIDER">
6369                     <context link="provider" field="owner"/>
6370                 </retrieve>
6371                 <update permission="ADMIN_PROVIDER">
6372                     <context link="provider" field="owner"/>
6373                 </update>
6374                 <delete permission="ADMIN_PROVIDER">
6375                     <context link="provider" field="owner"/>
6376                 </delete>
6377             </actions>
6378         </permacrud>
6379         </class>
6380
6381         <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">
6382                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6383                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6384                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6385                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6386                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6387                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6388                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6389         </fields>
6390                 <links>
6391                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6392                 </links>
6393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6394             <actions>
6395                 <create permission="ADMIN_PROVIDER">
6396                     <context link="provider" field="owner"/>
6397                 </create>
6398                 <retrieve permission="ADMIN_PROVIDER">
6399                     <context link="provider" field="owner"/>
6400                 </retrieve>
6401                 <update permission="ADMIN_PROVIDER">
6402                     <context link="provider" field="owner"/>
6403                 </update>
6404                 <delete permission="ADMIN_PROVIDER">
6405                     <context link="provider" field="owner"/>
6406                 </delete>
6407             </actions>
6408         </permacrud>
6409     </class>
6410         <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">
6411                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6412                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6413                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6414                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6415                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6416                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6417                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6418                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6419                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6420                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6421                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6422                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6423                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6424                 </fields>
6425                 <links>
6426                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6427                 </links>
6428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6429             <actions>
6430                 <create permission="ADMIN_PROVIDER">
6431                     <context link="contact" jump='provider' field="owner"/>
6432                 </create>
6433                 <retrieve permission="ADMIN_PROVIDER">
6434                     <context link="contact" jump='provider' field="owner"/>
6435                 </retrieve>
6436                 <update permission="ADMIN_PROVIDER">
6437                     <context link="contact" jump='provider' field="owner"/>
6438                 </update>
6439                 <delete permission="ADMIN_PROVIDER">
6440                     <context link="contact" jump='provider' field="owner"/>
6441                 </delete>
6442             </actions>
6443         </permacrud>
6444         </class>
6445
6446         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6447                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6448                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6449                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6450                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6451                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6452                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6453                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6454                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6455                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6456                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6457                 </fields>
6458                 <links>
6459                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6460                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6461                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6462                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6463                 </links>
6464         </class>
6465
6466         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6467                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6468                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6469                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6470                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6471                 </fields>
6472                 <links>
6473             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6474                 </links>
6475                 <!--
6476                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6477                         But here's what it should look like if we ever do use pcrud.
6478                 -->
6479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6480                         <actions>
6481                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6482                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6483                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6484                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6485                         </actions>
6486                 </permacrud>
6487         </class>
6488
6489         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6490                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6491                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6492                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6493                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6494                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6495                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6496                 </fields>
6497                 <links>
6498                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6499                 </links>
6500                 <!--
6501                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6502                         But here's what it should look like if we ever do use pcrud.
6503                 -->
6504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6505                         <actions>
6506                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6507                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6508                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6509                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6510                         </actions>
6511                 </permacrud>
6512         </class>
6513
6514         <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">
6515                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6516                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6517                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6518                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6519                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6520                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6521                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6522                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6523                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6524                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6525                 </fields>
6526                 <links>
6527                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6528                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6529             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6530             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6531                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6532                 </links>
6533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6534             <actions>
6535                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6536                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6537                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6538                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6539             </actions>
6540         </permacrud>
6541         </class>
6542
6543         <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">
6544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6545                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6546                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6547                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6548                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6549                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6550                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6551                 </fields>
6552                 <links>
6553                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6554                 </links>
6555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6556                         <actions>
6557                                 <create permission="ADMIN_FUNDING_SOURCE">
6558                     <context link="funding_source" field="owner"/>
6559                 </create>
6560                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6561                     <context link="funding_source" field="owner"/>
6562                 </retrieve>
6563                                 <update permission="ADMIN_FUNDING_SOURCE">
6564                     <context link="funding_source" field="owner"/>
6565                 </update>
6566                                 <delete permission="ADMIN_FUNDING_SOURCE">
6567                     <context link="funding_source" field="owner"/>
6568                 </delete>
6569                         </actions>
6570                 </permacrud>
6571         </class>
6572
6573         <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
6574                 <fields oils_persist:primary="id">
6575                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6576                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6577                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6579                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6580                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6581                 </fields>
6582                 <links>
6583                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6584                 </links>
6585         </class>
6586
6587         <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">
6588                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6589                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6590                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6591                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6592                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6593                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6594                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6595                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6596                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6597                 </fields>
6598                 <links>
6599                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6600                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6601                 </links>
6602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6603                         <actions>
6604                                 <create permission="ADMIN_ACQ_FUND">
6605                     <context link="fund" field="org"/>
6606                 </create>
6607                                 <retrieve permission="ADMIN_ACQ_FUND">
6608                     <context link="fund" field="org"/>
6609                 </retrieve>
6610                                 <update permission="ADMIN_ACQ_FUND">
6611                     <context link="fund" field="org"/>
6612                 </update>
6613                                 <delete permission="ADMIN_ACQ_FUND">
6614                     <context link="fund" field="org"/>
6615                 </delete>
6616                         </actions>
6617                 </permacrud>
6618         </class>
6619
6620         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6622                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6623                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6624                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6625                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6626                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6627                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6628                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6629                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6630                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6631                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6632                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6633                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6634                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6635                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6636                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6637                 </fields>
6638                 <links>
6639                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6640                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6641             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6642             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6643             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6644                 </links>
6645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6646             <actions>
6647                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6648                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6649                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6650                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6651             </actions>
6652         </permacrud>
6653         </class>
6654
6655         <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">
6656                 <fields oils_persist:primary="fund">
6657                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6658                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6659                 </fields>
6660                 <links>
6661                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6662                 </links>
6663         </class>
6664
6665         <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">
6666                 <fields oils_persist:primary="fund">
6667                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6668                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6669                 </fields>
6670                 <links>
6671                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6672                 </links>
6673         </class>
6674
6675         <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">
6676                 <fields oils_persist:primary="fund">
6677                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6678                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6679                 </fields>
6680                 <links>
6681                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6682                 </links>
6683         </class>
6684
6685         <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">
6686                 <fields oils_persist:primary="fund">
6687                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6688                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6689                 </fields>
6690                 <links>
6691                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6692                 </links>
6693         </class>
6694
6695         <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">
6696                 <fields oils_persist:primary="fund">
6697                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6698                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6699                 </fields>
6700                 <links>
6701                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6702                 </links>
6703         </class>
6704
6705    <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">
6706         <fields oils_persist:primary="fund">
6707             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6708             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6709         </fields>
6710         <links>
6711             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6712         </links>
6713     </class>
6714
6715    <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">
6716         <fields oils_persist:primary="fund">
6717             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6718             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6719         </fields>
6720         <links>
6721             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6722         </links>
6723     </class>
6724
6725    <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">
6726         <fields oils_persist:primary="fund">
6727             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6728             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6729         </fields>
6730         <links>
6731             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6732         </links>
6733     </class>
6734
6735    <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">
6736         <fields oils_persist:primary="fund">
6737             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6738             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6739         </fields>
6740         <links>
6741             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6742         </links>
6743     </class>
6744
6745    <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">
6746         <fields oils_persist:primary="fund">
6747             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6748             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6749         </fields>
6750         <links>
6751             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6752         </links>
6753     </class>
6754
6755         <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">
6756                 <fields oils_persist:primary="funding_source">
6757                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6758                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6759                 </fields>
6760                 <links>
6761                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6762                 </links>
6763         </class>
6764
6765         <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">
6766                 <fields oils_persist:primary="funding_source">
6767                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6768                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6769                 </fields>
6770                 <links>
6771                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6772                 </links>
6773         </class>
6774
6775         <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">
6776                 <fields oils_persist:primary="funding_source">
6777                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6778                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6779                 </fields>
6780                 <links>
6781                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6782                 </links>
6783         </class>
6784
6785         <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">
6786                 <fields oils_persist:primary="fund">
6787                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6788                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6789                 </fields>
6790                 <links>
6791                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6792                 </links>
6793         </class>
6794
6795         <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">
6796                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6797                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6798                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6799                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6800                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6801                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6802                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6803                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6804                 </fields>
6805                 <links>
6806                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6807                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6808                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6809                 </links>
6810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6811                         <actions>
6812                                 <create permission="ADMIN_ACQ_FUND">
6813                     <context link="fund" field="org"/>
6814                 </create>
6815                                 <retrieve permission="ADMIN_ACQ_FUND">
6816                     <context link="fund" field="org"/>
6817                 </retrieve>
6818                                 <update permission="ADMIN_ACQ_FUND">
6819                     <context link="fund" field="org"/>
6820                 </update>
6821                                 <delete permission="ADMIN_ACQ_FUND">
6822                     <context link="fund" field="org"/>
6823                 </delete>
6824                         </actions>
6825                 </permacrud>
6826         </class>
6827
6828     <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">
6829         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6830             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6831             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6832             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6833             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6834             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6835             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6836             <field reporter:label="Note" name="note" reporter:datatype="text" />
6837             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6838         </fields>
6839         <links>
6840             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6841             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6842             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6843         </links>
6844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6845                         <actions>
6846                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6847                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6848                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6849                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6850                         </actions>
6851                 </permacrud>
6852     </class>
6853
6854         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6856                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6857                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6858                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6859                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6860                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6861                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6862                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6863                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6864                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6865                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6866                 </fields>
6867                 <links>
6868                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6869                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6870                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6871                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6872                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6873                 </links>
6874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6875                         <actions>
6876                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6877                         </actions>
6878                 </permacrud>
6879         </class>
6880
6881         <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">
6882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6883                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6884                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6885                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6886                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6887                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6888                 </fields>
6889                 <links>
6890                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6891                 </links>
6892                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6893                         <actions>
6894                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6895                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6896                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6897                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6898                         </actions>
6899                 </permacrud>
6900         </class>
6901
6902         <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">
6903                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6904                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6905                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6906                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6907                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6908                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6909                         <field reporter:label="State" name="state" reporter:datatype="text" />
6910                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6911                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6912                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6913                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6914                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6915                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6916                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6917                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6918                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6919                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6920                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6921                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6922                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6923                 </fields>
6924                 <links>
6925                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6926                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6927                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6928                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6929                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6930                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6931                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6932                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6933                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6934                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6935                 </links>
6936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6937                         <actions>
6938                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6939                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6940                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6941                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6942                         </actions>
6943                 </permacrud>
6944         </class>
6945
6946         <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">
6947                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6948                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6949                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6950                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6951                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6952                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6953                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6954                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6955                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6956                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6957                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6958                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6959                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6960                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6961                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6962                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6963                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6964                 </fields>
6965                 <links>
6966                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6967                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6968                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6969                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6970                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6971                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6972                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6973                 </links>
6974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6975             <actions>
6976                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6977             </actions>
6978                 </permacrud>
6979         </class>
6980
6981         <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">
6982                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6983                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6984                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6985                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6986                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6987                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6988                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6989                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6990                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6991                 </fields>
6992                 <links>
6993                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6994                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6995                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6996                 </links>
6997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6998             <actions>
6999                 <create permission="CREATE_PURCHASE_ORDER">
7000                     <context link="purchase_order" field="ordering_agency"/>
7001                 </create>
7002                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7003                     <context link="purchase_order" field="ordering_agency"/>
7004                 </retrieve>
7005                 <update permission="CREATE_PURCHASE_ORDER">
7006                     <context link="purchase_order" field="ordering_agency"/>
7007                 </update>
7008                 <delete permission="CREATE_PURCHASE_ORDER">
7009                     <context link="purchase_order" field="ordering_agency"/>
7010                 </delete>
7011             </actions>
7012                 </permacrud>
7013         </class>
7014
7015         <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">
7016                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7017                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7018                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7019                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7020                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7021                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7022                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7023                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7024                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7025                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7026                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7027                 </fields>
7028                 <links>
7029                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7030                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7031                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7032                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7033                 </links>
7034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7035             <actions>
7036                 <create permission="CREATE_PURCHASE_ORDER">
7037                     <context link="purchase_order" field="ordering_agency"/>
7038                 </create>
7039                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7040                     <context link="purchase_order" field="ordering_agency"/>
7041                 </retrieve>
7042                 <update permission="CREATE_PURCHASE_ORDER">
7043                     <context link="purchase_order" field="ordering_agency"/>
7044                 </update>
7045                 <delete permission="CREATE_PURCHASE_ORDER">
7046                     <context link="purchase_order" field="ordering_agency"/>
7047                 </delete>
7048             </actions>
7049                 </permacrud>
7050         </class>
7051
7052         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7053                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7054                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7055                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7056                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7057                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7058                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7059                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7060                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7061                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7062                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7063                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7064                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7065                         <field reporter:label="State" name="state" reporter:datatype="text" />
7066                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7067                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7068                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7069                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7070                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7071                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7072                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7073                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7074                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7075                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7076                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7077                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7078                 </fields>
7079                 <links>
7080                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7081                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7082                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7083                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7084                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7085                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7086                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7087                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7088                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7089                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7090                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7091                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7092                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7093                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7094                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7095                 </links>
7096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7097                         <actions>
7098                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7099                                         <context link="purchase_order" field="ordering_agency"/>
7100                                         <context link="picklist" field="org_unit"/>
7101                                 </retrieve>
7102                         </actions>
7103                 </permacrud>
7104         </class>
7105
7106         <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">
7107                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7108                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7109                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7110                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7111                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7112                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7113                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7114                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7115                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7116                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7117                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7118                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7119                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7120                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7121                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7122                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7123                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7124                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7125                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7126                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7127                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7128                 </fields>
7129                 <links>
7130                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7131                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7132                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7133                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7134                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7135                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7136                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7137                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7138                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7139                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7140                 </links>
7141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7142                         <actions>
7143                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7144                                         <context link="purchase_order" field="ordering_agency"/>
7145                                         <context link="picklist" field="org_unit"/>
7146                                 </retrieve>
7147                         </actions>
7148                 </permacrud>
7149         </class>
7150
7151         <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">
7152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7153                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7154                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7155                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7156                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7157                 </fields>
7158                 <links>
7159                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7160                 </links>
7161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7162                         <actions>
7163                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7164                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7165                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7166                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7167                         </actions>
7168                 </permacrud>
7169         </class>
7170
7171         <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">
7172                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7173                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7174                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7175                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7176                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7177                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7178                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7179                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7180                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7181                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7182                 </fields>
7183                 <links>
7184                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7185                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7186                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7187                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7188                 </links>
7189         </class>
7190
7191         <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">
7192                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7193                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7194                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7195                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7196                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7197                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7198                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7199                 </fields>
7200                 <links>
7201                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7202                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7203                 </links>
7204         </class>
7205
7206         <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">
7207                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7208                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7209                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7210                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7211                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7212                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7213                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7214                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7215                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7216                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7217                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7218                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7219                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7220                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7221                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7222                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7223                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7224                 </fields>
7225                 <links>
7226                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7227                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7228                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7229                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7230                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7231                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7232                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7233                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7234                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7235                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7236                 </links>
7237         </class>
7238
7239         <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">
7240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7241                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7242                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7243                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7244                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7245                 </fields>
7246                 <links/>
7247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7248                         <actions>
7249                                 <retrieve />
7250                         </actions>
7251                 </permacrud>
7252         </class>
7253
7254         <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">
7255                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7256                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7257                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7258                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7259                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7260                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7261             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7262                 </fields>
7263                 <links/>
7264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7265             <actions>
7266                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7267                 <retrieve />
7268                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7269                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7270             </actions>
7271         </permacrud>
7272         </class>
7273
7274         <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">
7275                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7276                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7277                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7278                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7279                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7280                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7281                 </fields>
7282                 <links/>
7283         </class>
7284         <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">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7286                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7287                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7288                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7289                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7290                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7291                 </fields>
7292                 <links>
7293                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7294                 </links>
7295         </class>
7296
7297         <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">
7298             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7299                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7300                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7301                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7302                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7303                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7304                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7305         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7306
7307             </fields>
7308             <links>
7309                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7310             </links>
7311             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7312                 <actions>
7313                     <create permission="ADMIN_PROVIDER">
7314                         <context link="provider" field="owner"/>
7315                     </create>
7316                     <retrieve permission="ADMIN_PROVIDER">
7317                         <context link="provider" field="owner"/>
7318                     </retrieve>
7319                     <update permission="ADMIN_PROVIDER">
7320                         <context link="provider" field="owner"/>
7321                     </update>
7322                     <delete permission="ADMIN_PROVIDER">
7323                         <context link="provider" field="owner"/>
7324                     </delete>
7325                 </actions>
7326             </permacrud>
7327         </class>
7328         
7329         <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">
7330             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7331                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7332                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7333                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7334                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7335             </fields>
7336             <links>
7337                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7338             </links>
7339             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340                 <actions>
7341                     <create permission="ADMIN_PROVIDER">
7342                         <context link="provider" field="owner"/>
7343                     </create>
7344                     <retrieve permission="ADMIN_PROVIDER">
7345                         <context link="provider" field="owner"/>
7346                     </retrieve>
7347                     <update permission="ADMIN_PROVIDER">
7348                         <context link="provider" field="owner"/>
7349                     </update>
7350                     <delete permission="ADMIN_PROVIDER">
7351                         <context link="provider" field="owner"/>
7352                     </delete>
7353                 </actions>
7354             </permacrud>
7355         </class>
7356         
7357         <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">
7358             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7359                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7360                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7361                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7362                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7363                 </fields>
7364                 <links/>
7365         </class>
7366
7367         <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">
7368                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7369                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7370                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7371                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7372                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7373                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7374                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7375                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7376                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7377                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7378                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7379                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7380                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7381                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7382                 </fields>
7383                 <links>
7384                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7385                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7386                 </links>
7387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7388             <actions>
7389                 <create permission="ADMIN_PROVIDER">
7390                     <context link="provider" field="owner"/>
7391                 </create>
7392                 <retrieve permission="ADMIN_PROVIDER">
7393                     <context link="provider" field="owner"/>
7394                 </retrieve>
7395                 <update permission="ADMIN_PROVIDER">
7396                     <context link="provider" field="owner"/>
7397                 </update>
7398                 <delete permission="ADMIN_PROVIDER">
7399                     <context link="provider" field="owner"/>
7400                 </delete>
7401             </actions>
7402         </permacrud>
7403         </class>
7404
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7407                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7408                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7409                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7410                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7411                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7412                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7413                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7414                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7415                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7416                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7417                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7418                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7419                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7420                 </fields>
7421                 <links>
7422                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7423                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7424                 </links>
7425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7426             <actions>
7427                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7428                     <context link="account" jump="provider" field="owner"/>
7429                 </retrieve>
7430                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7431                     <context link="account" jump="provider" field="owner"/>
7432                 </update>
7433                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7434                     <context link="account" jump="provider" field="owner"/>
7435                 </delete>
7436             </actions>
7437         </permacrud>
7438         </class>
7439
7440
7441         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7442                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7443                         <field name="id" reporter:datatype="id" />
7444                         <field name="parent" reporter:datatype="link"/>
7445                         <field name="owner" reporter:datatype="link"/>
7446                         <field name="create_time" reporter:datatype="timestamp"/>
7447                         <field name="name" reporter:datatype="text"/>
7448                         <field name="shared" reporter:datatype="bool"/>
7449                         <field name="share_with" reporter:datatype="link"/>
7450                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7451                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7452                 </fields>
7453                 <links>
7454                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7455                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7456                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7457                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7458                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7459                 </links>
7460         </class>
7461         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7462                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7463                         <field name="id" reporter:datatype="id" />
7464                         <field name="parent" reporter:datatype="link"/>
7465                         <field name="owner" reporter:datatype="link"/>
7466                         <field name="create_time" reporter:datatype="timestamp"/>
7467                         <field name="name" reporter:datatype="text"/>
7468                         <field name="shared" reporter:datatype="bool"/>
7469                         <field name="share_with" reporter:datatype="link"/>
7470                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7471                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7472                 </fields>
7473                 <links>
7474                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7475                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7476                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7477                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7478                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7479                 </links>
7480         </class>
7481         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7482                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7483                         <field name="id" reporter:datatype="id" />
7484                         <field name="parent" reporter:datatype="link"/>
7485                         <field name="owner" reporter:datatype="link"/>
7486                         <field name="create_time" reporter:datatype="timestamp"/>
7487                         <field name="name" reporter:datatype="text"/>
7488                         <field name="shared" reporter:datatype="bool"/>
7489                         <field name="share_with" reporter:datatype="link"/>
7490                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7491                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7492                 </fields>
7493                 <links>
7494                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7495                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7496                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7497                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7498                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7499                 </links>
7500         </class>
7501         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7502                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7503                         <field name="id" reporter:datatype="id" />
7504                         <field name="owner" reporter:datatype="link"/>
7505                         <field name="create_time" reporter:datatype="timestamp"/>
7506                         <field name="name" reporter:datatype="text"/>
7507                         <field name="data" reporter:datatype="text"/>
7508                         <field name="folder" reporter:datatype="link"/>
7509                         <field name="description" reporter:datatype="text"/>
7510                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7511                 </fields>
7512                 <links>
7513                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7514                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7515                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7516                 </links>
7517         </class>
7518         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7519                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7520                         <field name="id" reporter:datatype="id" />
7521                         <field name="owner" reporter:datatype="link"/>
7522                         <field name="create_time" reporter:datatype="timestamp"/>
7523                         <field name="template" reporter:datatype="link"/>
7524                         <field name="data" reporter:datatype="text"/>
7525                         <field name="folder" reporter:datatype="link"/>
7526                         <field name="recur" reporter:datatype="bool"/>
7527                         <field name="recurrence" reporter:datatype="interval"/>
7528                         <field name="name" reporter:datatype="text"/>
7529                         <field name="description" reporter:datatype="text"/>
7530                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7531                 </fields>
7532                 <links>
7533                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7534                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7535                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7536                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7537                 </links>
7538         </class>
7539         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7540                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7541                         <field name="id" reporter:datatype="id" />
7542                         <field name="runner" reporter:datatype="link"/>
7543                         <field name="start_time" reporter:datatype="timestamp"/>
7544                         <field name="complete_time" reporter:datatype="timestamp"/>
7545                         <field name="run_time" reporter:datatype="timestamp"/>
7546                         <field name="email" reporter:datatype="text"/>
7547                         <field name="excel_format" reporter:datatype="bool"/>
7548                         <field name="csv_format" reporter:datatype="bool"/>
7549                         <field name="html_format" reporter:datatype="bool"/>
7550                         <field name="error_code" reporter:datatype="int"/>
7551                         <field name="error_text" reporter:datatype="text"/>
7552                         <field name="report" reporter:datatype="link"/>
7553                         <field name="folder" reporter:datatype="link"/>
7554                         <field name="chart_pie" reporter:datatype="bool"/>
7555                         <field name="chart_bar" reporter:datatype="bool"/>
7556                         <field name="chart_line" reporter:datatype="bool"/>
7557                 </fields>
7558                 <links>
7559                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7560                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7561                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7562                 </links>
7563         </class>
7564         <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">
7565                 <fields oils_persist:primary="id">
7566                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7567                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7568                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7569                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7570                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7571                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7572                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7573                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7574                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7575                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7576                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7577                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7578                 </fields>
7579                 <links>
7580                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7581                 </links>
7582         </class>
7583         <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">
7584                 <fields oils_persist:primary="id">
7585                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7586                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7587                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7588                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7589                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7590                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7591                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7592                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7593                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7594                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7595                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7596                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7597                 </fields>
7598                 <links>
7599                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7600                 </links>
7601         </class>
7602         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7603                 <fields oils_persist:primary="id">
7604                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7605                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7606                         <field reporter:label="Fingerprint" name="fingerprint" />
7607                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7608                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7609                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7610                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7611                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7612                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7613                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7614                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7615                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7616                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7617                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7618                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7619                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7620                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7621                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7622                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7623                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7624                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7625                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7626                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7627                 </fields>
7628                 <links>
7629                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7630                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7631                 </links>
7632         </class>
7633         <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">
7634                 <fields oils_persist:primary="id">
7635                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7636                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7637                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7638                 </fields>
7639                 <links>
7640                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7641                 </links>
7642         </class>
7643         <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">
7644                 <fields oils_persist:primary="id">
7645                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7646                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7647                 </fields>
7648                 <links>
7649                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7650                 </links>
7651         </class>
7652         <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">
7653                 <fields oils_persist:primary="id">
7654                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7655                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7656                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7657                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7658                 </fields>
7659                 <links>
7660                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7661                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7662                 </links>
7663         </class>
7664         <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">
7665                 <fields oils_persist:primary="xact">
7666                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7667                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7668                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7669                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7670                 </fields>
7671                 <links>
7672                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7673                 </links>
7674         </class>
7675         <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">
7676                 <fields oils_persist:primary="xact">
7677                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7678                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7679                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7680                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7681                 </fields>
7682                 <links>
7683                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7684                 </links>
7685         </class>
7686         <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)">
7687                 <fields oils_persist:primary="id">
7688                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7689                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7690                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7691                 </fields>
7692                 <links>
7693                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7694                 </links>
7695         </class>
7696         <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">
7697                 <fields oils_persist:primary="id">
7698                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7699                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7700                 </fields>
7701                 <links>
7702                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7703                 </links>
7704         </class>
7705         <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">
7706                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7707                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7708                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7709                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7710                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7711                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7712                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7713                 </fields>
7714                 <links>
7715                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7716                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7717                 </links>
7718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7719                         <actions>
7720                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7721                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7722                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7723                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7724                         </actions>
7725                 </permacrud>
7726         </class>
7727         <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">
7728                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7729                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7730                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7731                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7732                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7733                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7734                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7735                 </fields>
7736                 <links>
7737                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7738                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7739                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7740                 </links>
7741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7742                         <actions>
7743                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7744                                         <context link="formula" field="owner"/>
7745                                 </create>
7746                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7747                                         <context link="formula" field="owner"/>
7748                                 </retrieve>
7749                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7750                                         <context link="formula" field="owner"/>
7751                                 </update>
7752                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7753                                         <context link="formula" field="owner"/>
7754                                 </delete>
7755                         </actions>
7756                 </permacrud>
7757         </class>
7758
7759         <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">
7760                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7761                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7762                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7763                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7764                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7765                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7766                 </fields>
7767                 <links>
7768                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7769                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7770                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7771                 </links>
7772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7773                         <actions>
7774                                 <create permission="CREATE_PURCHASE_ORDER">
7775                                         <context link="formula" field="owner"/>
7776                 </create>
7777                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7778                                         <context link="formula" field="owner"/>
7779                 </retrieve>
7780                                 <update permission="CREATE_PURCHASE_ORDER">
7781                                         <context link="formula" field="owner"/>
7782                 </update>
7783                                 <delete permission="CREATE_PURCHASE_ORDER">
7784                                         <context link="formula" field="owner"/>
7785                 </delete>
7786                         </actions>
7787                 </permacrud>
7788         </class>
7789
7790         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7791                 <fields oils_persist:primary="id">
7792                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7793                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7794                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7795                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7796                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7797                 </fields>
7798                 <links>
7799                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7800                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7801                 </links>
7802         </class>
7803
7804         <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">
7805                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7806                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7807                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7808                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7809                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7810                 </fields>
7811                 <links>
7812                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7813                 </links>
7814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7815                         <actions>
7816                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7817                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7818                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7819                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7820                         </actions>
7821                 </permacrud>
7822         </class>
7823
7824         <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">
7825                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7826                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7827                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7828                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7829                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7830                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7831                 </fields>
7832                 <links>
7833                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7834                 </links>
7835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7836                         <actions>
7837                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7838                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7839                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7840                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7841                         </actions>
7842                 </permacrud>
7843         </class>
7844
7845         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7846                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7847                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7848                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7849                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7850                 </fields>
7851                 <links>
7852                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7853                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7854                 </links>
7855         </class>
7856
7857         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7858                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7859                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7860                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7861                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7862                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7863                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7864                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7865                 </fields>
7866                 <links>
7867                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7868                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7869                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7870                 </links>
7871         </class>
7872
7873         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7874                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7875                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7876                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7877                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7878                 </fields>
7879                 <links>
7880                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7881                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7882                 </links>
7883         </class>
7884
7885         <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7886                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7887                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7888                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7889                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7890                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7891                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7892                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7893                 </fields>
7894                 <links>
7895                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7896                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7898                 </links>
7899         </class>
7900
7901         <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">
7902                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7903                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7904                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7905                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7906                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7907                 </fields>
7908                 <links>
7909                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7910                 </links>
7911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7912             <actions>
7913                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7914                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7915                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7916                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7917             </actions>
7918                 </permacrud>
7919         </class>
7920
7921         <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">
7922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7923                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7924                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7925                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7926                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7927                 </fields>
7928                 <links>
7929                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7930                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7931                 </links>
7932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7933                         <actions>
7934                                 <create permission="ADMIN_CLAIM_POLICY">
7935                                         <context link="claim_policy" field="org_unit"/>
7936                 </create>
7937                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7938                                         <context link="claim_policy" field="org_unit"/>
7939                 </retrieve>
7940                                 <update permission="ADMIN_CLAIM_POLICY">
7941                                         <context link="claim_policy" field="org_unit"/>
7942                 </update>
7943                                 <delete permission="ADMIN_CLAIM_POLICY">
7944                                         <context link="claim_policy" field="org_unit"/>
7945                 </delete>
7946                         </actions>
7947                 </permacrud>
7948         </class>
7949
7950     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7951         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7952             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7953             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7954             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7955             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7956             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7957             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7958             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7959             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7960             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7961             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7962             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7963             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7964             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7965             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7966             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7967         </fields>
7968     </class>
7969
7970     <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">
7971         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7972             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7973             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7974             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7975             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7976             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7977         </fields>
7978     </class>
7979
7980     <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">
7981         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7982             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7983             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7984             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7985             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7986             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7987             <field reporter:label="City" name="city" reporter:datatype="text"/>
7988             <field reporter:label="State" name="state" reporter:datatype="text"/>
7989             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7990             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7991             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7992         </fields>
7993     </class>
7994
7995     <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">
7996         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7997             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7998             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7999             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8000             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8001             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8002             <field reporter:label="City" name="city" reporter:datatype="text"/>
8003             <field reporter:label="State" name="state" reporter:datatype="text"/>
8004             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8005             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8006             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8007         </fields>
8008     </class>
8009
8010     <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">
8011         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8012             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8013             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8014             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8015             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8016             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8017             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8018         </fields>
8019     </class>
8020
8021         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8022                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8023                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8024                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8025                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8026                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8027                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8028                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8029                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8030                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8031                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8032                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8033                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8034                 </fields>
8035                 <links>
8036                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8037                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8038                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8039                 </links>
8040         </class>
8041
8042         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
8043                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8044                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8045                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8046                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8047                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8048                 </fields>
8049                 <links>
8050                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8051                 </links>
8052         </class>
8053
8054     <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">
8055         <fields>
8056             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8057             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8058             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8059         </fields>
8060                 <links>
8061                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8062                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8063                 </links>
8064     </class>
8065
8066     <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">
8067         <fields>
8068             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8069             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8070         </fields>
8071                 <links>
8072                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8073                 </links>
8074     </class>
8075
8076     <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">
8077         <fields>
8078             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8079             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8080             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8081         </fields>
8082                 <links>
8083                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8084                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8085                 </links>
8086     </class>
8087
8088     <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">
8089         <fields>
8090             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8091             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8092         </fields>
8093                 <links>
8094                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8095                 </links>
8096     </class>
8097
8098     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8099                 <oils_persist:source_definition>
8100
8101             SELECT  DISTINCT l.*
8102               FROM  action.unfulfilled_hold_loops l
8103                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8104               WHERE l.count = m.max
8105
8106                 </oils_persist:source_definition>
8107         <fields>
8108             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8109             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8110             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8111         </fields>
8112                 <links>
8113                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8114                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8115                 </links>
8116     </class>
8117
8118         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8119                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8120                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8121                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8122                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8123                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8124                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8125                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8126                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8127                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8128                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8129                 </fields>
8130                 <links>
8131                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8132                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8133                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8134                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8135                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8136                 </links>
8137         </class>
8138
8139         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8141                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8142                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8143                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8144                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8145                 </fields>
8146                 <links>
8147                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8148                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8149                 </links>
8150         </class>
8151
8152         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8153                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8154                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8155                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8156                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8157                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8158                 </fields>
8159                 <links>
8160                 </links>
8161         </class>
8162
8163         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8164                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8165                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8166                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8167                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8168                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8169                 </fields>
8170                 <links>
8171                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8172                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8173                 </links>
8174         </class>
8175         
8176         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8177                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8178                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8179                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8180                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8181                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8182                 </fields>
8183                 <links>
8184                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8185                 </links>
8186         </class>
8187         
8188         <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
8189                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8190                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8191                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8192                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8193                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8194                 </fields>
8195                 <links>
8196                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8197                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8198                 </links>
8199         </class>
8200
8201         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8202                 <fields oils_persist:primary="name">
8203                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8204                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8205                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8206                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8207                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8208                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8209                 </fields>
8210                 <links>
8211                 </links>
8212         </class>
8213
8214         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8215                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8216                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8217                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8218                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8219                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8220                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8221                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8222                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8223                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8224                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8225                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8226                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8227                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8228                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8229                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8230                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8231                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8232                 </fields>
8233                 <links>
8234                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8235                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8236                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8237                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8238                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8239                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8240                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8241                 </links>
8242         </class>
8243
8244         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8245                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8246                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8247                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8248                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8249                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8250                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8251                 </fields>
8252                 <links>
8253                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8254                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8255                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8256                 </links>
8257         </class>
8258
8259         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8260                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8261                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8262                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8263                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8264                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8265                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8266                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8267                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8268                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8269                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8270                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8271                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8272                 </fields>
8273                 <links>
8274                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8275                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8276                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8277                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8278                 </links>
8279         </class>
8280
8281         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8282                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8283                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8284                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8285                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8286                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8287                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8288                 </fields>
8289                 <links>
8290                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8291                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8292                 </links>
8293         </class>
8294
8295         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8296                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8297                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8298                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8299                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8300                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8301                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8302                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8303                 </fields>
8304                 <links>
8305                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8306                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8307                 </links>
8308         </class>
8309
8310         <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
8311                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8312                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8313                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8314                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8315                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8316                 </fields>
8317                 <links>
8318                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8319                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8320                 </links>
8321         </class>
8322
8323         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8324                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8325                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8326                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8327                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8328                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8329                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8330                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8331                 </fields>
8332                 <links>
8333                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8334                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8335                 </links>
8336         </class>
8337
8338         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8339                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8340                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8341                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8342                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8343                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8344                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8345                 </fields>
8346                 <links>
8347                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8348                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8349                 </links>
8350         </class>
8351
8352         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8353                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8354                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8355                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8356                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8357                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8358                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8359                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8360                 </fields>
8361                 <links>
8362                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8363                 </links>
8364         </class>
8365
8366         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8367                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8368                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8369                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8370                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8371                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8372                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8373                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8374                 </fields>
8375                 <links>
8376                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8377                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8378                 </links>
8379         </class>
8380
8381         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8382                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8383                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8384                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8385                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8386                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8387                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8388                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8389                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8390                 </fields>
8391                 <links>
8392                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8393                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8394                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8395                 </links>
8396         </class>
8397
8398         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8399                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8400                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8401                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8402                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8403                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8404                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8405                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8406                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8407                 </fields>
8408                 <links>
8409                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8410                 </links>
8411         </class>
8412
8413         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8414                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8415                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8416                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8417                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8418                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8419                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8420                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8421                 </fields>
8422                 <links>
8423                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8424                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8425                 </links>
8426         </class>
8427
8428         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8429                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8430                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8431                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8432                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8433                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8434                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8435                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8436                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8437                 </fields>
8438                 <links>
8439                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8440                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8441                 </links>
8442         </class>
8443
8444         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8445                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8446                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8447                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8448                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8449                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8450                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8451                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8452                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8453                 </fields>
8454                 <links>
8455                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8456                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8457                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8458                 </links>
8459         </class>
8460
8461         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8462                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8463                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8464                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8465                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8466                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8467                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8468                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8469                 </fields>
8470                 <links>
8471                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8472                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8473                 </links>
8474         </class>
8475
8476         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8477                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8478                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8479                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8480                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8481                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8482                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8483                 </fields>
8484                 <links>
8485                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8486                 </links>
8487         </class>
8488
8489         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8490                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8491                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8492                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8493                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8494                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8495                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8496                 </fields>
8497                 <links>
8498                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8499                 </links>
8500         </class>
8501
8502         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8503                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8504                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8505                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8506                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8507                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8508                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8509                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8510                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8511                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8512                 </fields>
8513                 <links>
8514                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8515                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8516                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8517                 </links>
8518         </class>
8519
8520         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8521                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8522                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8523                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8524                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8525                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8526                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8527                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8528                 </fields>
8529                 <links>
8530                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8531                 </links>
8532         </class>
8533
8534         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8535                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8536                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8537                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8538                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8539                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8540                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8541                 </fields>
8542                 <links>
8543                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8544                 </links>
8545         </class>
8546
8547         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8548                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8549                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8550                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8551                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8552                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8553                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8554                 </fields>
8555                 <links>
8556                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8557                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8558                 </links>
8559         </class>
8560
8561         <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">
8562                 <fields oils_persist:primary="id">
8563                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8564                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8565                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8566                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8567                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8568                 </fields>
8569                 <links>
8570                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8571                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8572                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8573                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8574                 </links>
8575         </class>
8576
8577         <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">
8578                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8579                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8580                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8581                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8582                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8583                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8584                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8585                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8586                 </fields>
8587                 <links/>
8588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8589                         <actions>
8590                                 <retrieve/>
8591                         </actions>
8592                 </permacrud>
8593         </class>
8594
8595         <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">
8596                 <fields oils_persist:primary="ptype_key">
8597                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8598                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8599                 </fields>
8600                 <links/>
8601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8602                         <actions>
8603                                 <retrieve/>
8604                         </actions>
8605                 </permacrud>
8606         </class>
8607
8608         <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">
8609                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8610                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8611                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8612                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8613                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8614                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8615                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8616                 </fields>
8617                 <links>
8618                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8619                 </links>
8620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8621                         <actions>
8622                                 <retrieve/>
8623                         </actions>
8624                 </permacrud>
8625         </class>
8626
8627         <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">
8628                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8629                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8630                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8631                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8632                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8633                 </fields>
8634                 <links>
8635                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8636                 </links>
8637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8638                         <actions>
8639                                 <retrieve/>
8640                         </actions>
8641                 </permacrud>
8642         </class>
8643
8644         <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">
8645                 <fields oils_persist:primary="code">
8646                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8647                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8648                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8649                 </fields>
8650                 <links/>
8651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8652                         <actions>
8653                                 <retrieve/>
8654                         </actions>
8655                 </permacrud>
8656         </class>
8657
8658         <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">
8659                 <oils_persist:source_definition>
8660
8661             SELECT  b.id,
8662                     MAX(dcp.edit_date) AS last_delete_date
8663              FROM   biblio.record_entry b
8664                     JOIN asset.call_number cn ON (cn.record = b.id)
8665                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8666              WHERE  NOT b.deleted
8667              GROUP BY b.id
8668              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8669
8670                 </oils_persist:source_definition>
8671                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8672                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8673                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8674                 </fields>
8675                 <links>
8676                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8677                 </links>
8678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8679                         <actions>
8680                                 <retrieve/>
8681                         </actions>
8682                 </permacrud>
8683         </class>
8684
8685         <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">
8686                 <oils_persist:source_definition>
8687
8688             -- -- 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.
8689             -- -- 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
8690             -- -- may not.
8691             -- SELECT
8692             --     bre.id AS "bib_id",
8693             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8694             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8695             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8696             -- FROM (
8697                 SELECT
8698                     y.bre AS "id",
8699                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8700                     y.hold_count AS "hold_count",
8701                     (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"
8702                 FROM (
8703                         SELECT
8704                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8705                             COUNT(*) AS "hold_count"
8706                         FROM action.hold_request h
8707                         WHERE
8708                             cancel_time IS NULL
8709                             AND fulfillment_time IS NULL
8710                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8711                         GROUP BY 1
8712                     )y LEFT JOIN (
8713                         SELECT 
8714                             (SELECT id
8715                                 FROM biblio.record_entry 
8716                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8717                             ) AS "bre", 
8718                             COUNT(*) AS "copy_count"
8719                         FROM asset.copy
8720                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8721                         WHERE copy.holdable 
8722                             AND NOT copy.deleted 
8723                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8724                         GROUP BY 1
8725                     )x ON x.bre = y.bre
8726                 -- )z RIGHT JOIN (
8727                 --     SELECT id
8728                 --     FROM biblio.record_entry
8729                 --     WHERE NOT deleted
8730                 -- )bre ON (z.bib_id = bre.id)
8731                 
8732
8733                 </oils_persist:source_definition>
8734                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8735                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8736                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8737                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8738                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8739                 </fields>
8740                 <links>
8741                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8742                 </links>
8743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8744                         <actions>
8745                                 <retrieve/>
8746                         </actions>
8747                 </permacrud>
8748         </class>
8749
8750         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
8751                 <oils_persist:source_definition>
8752             SELECT *,
8753                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
8754                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
8755             FROM
8756                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
8757                     FROM
8758                         action.hold_request ahr
8759                         JOIN reporter.hold_request_record rhrr USING (id)
8760                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8761                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
8762                     WHERE
8763                         ahr.cancel_time IS NULL
8764                         AND ahr.fulfillment_time IS NULL
8765                     GROUP BY bib_record, pickup_lib
8766                 )x
8767                 JOIN
8768                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
8769                     FROM
8770                         action.hold_request ahr
8771                         JOIN reporter.hold_request_record rhrr USING (id)
8772                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8773                     WHERE
8774                         ahr.cancel_time IS NULL
8775                         AND ahr.fulfillment_time IS NULL
8776                     GROUP BY bib_record
8777                 )y
8778                 USING (id)
8779                 </oils_persist:source_definition>
8780                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8781                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
8782                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
8783                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
8784                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
8785                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
8786                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
8787                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
8788                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
8789                 </fields>
8790                 <links>
8791                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8792                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8793                 </links>
8794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8795                         <actions>
8796                                 <retrieve/>
8797                         </actions>
8798                 </permacrud>
8799         </class>
8800
8801         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
8802                 <oils_persist:source_definition>
8803             SELECT
8804                 ac.id,
8805                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
8806                 MAX(actac.xact_start) AS last_circ
8807             FROM asset.copy ac
8808                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8809             GROUP BY ac.id
8810
8811             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
8812             --SELECT
8813             --    ac.id,
8814             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
8815             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
8816             --FROM asset.copy ac
8817             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8818             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
8819             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
8820                 </oils_persist:source_definition>
8821                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8822                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
8823                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
8824                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
8825                 </fields>
8826                 <links>
8827                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8828                 </links>
8829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8830                         <actions>
8831                                 <retrieve/>
8832                         </actions>
8833                 </permacrud>
8834         </class>
8835
8836         <!-- ********************************************************************************************************************* -->
8837         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8838         <!-- ********************************************************************************************************************* -->
8839         <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">
8840                 <fields oils_persist:primary="id">
8841                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8842                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8843                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8844                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8845                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8846                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8847                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8848                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8849                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8850                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8851                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8852                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8853                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8854                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8855                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8856                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8857                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8858                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8859                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8860                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8861                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8862                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8863                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8864                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8865                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8866                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8867                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8868                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8869                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8870                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8871                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8872                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8873                 </fields>
8874                 <links>
8875                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8876                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8877                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8878                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8879                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8880                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8881                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8882                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8883                 </links>
8884         </class>
8885
8886         <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">
8887                 <fields oils_persist:primary="id">
8888                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8889                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8890                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8891                 </fields>
8892                 <links>
8893                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8894                 </links>
8895         </class>
8896
8897         <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">
8898                 <fields oils_persist:primary="id">
8899                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8900                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8901                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8902                 </fields>
8903                 <links>
8904                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8905                 </links>
8906         </class>
8907
8908         <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">
8909                 <fields oils_persist:primary="id">
8910                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8911
8912                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8913                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8914                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8915
8916                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8917                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8918                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8919
8920                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8921                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8922
8923                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8924                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8925                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8926
8927                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8928                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8929
8930                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8931                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8932                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8933
8934                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8935                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8936                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8937
8938                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8939                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8940                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8941                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8942
8943                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8944                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8945
8946                 </fields>
8947                 <links>
8948                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8949                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8950                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8951                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8952                 </links>
8953         </class>
8954
8955         <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">
8956                 <oils_persist:source_definition>
8957
8958             SELECT
8959                 po.ordering_agency AS ordering_agency,
8960                 po.id AS purchase_order,
8961                 li.id AS lineitem,
8962                 lid.id AS lineitem_detail,
8963                 cpa.id AS claim_policy_action
8964             FROM
8965                 acq.lineitem_detail lid
8966                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8967                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8968                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8969                 JOIN acq.claim_policy_action cpa ON (
8970                     cpa.claim_policy = cp.id
8971
8972                     -- we only care about claim policy actions whose claim
8973                     -- interval we'd reached or exceeded
8974                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8975
8976                     -- filter out all claim policy actions where claim events
8977                     -- have occurred on or after the action's action_interval
8978                     AND NOT EXISTS (
8979                         SELECT 1
8980                         FROM
8981                             acq.claim_event evt
8982                             JOIN acq.claim claim ON (
8983                                 claim.id = evt.claim
8984                                 AND claim.lineitem_detail = lid.id
8985                             )
8986                         WHERE
8987                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8988                     )
8989                 )
8990             WHERE
8991                 lid.cancel_reason IS NULL
8992                 AND li.cancel_reason IS NULL -- belt/suspenders
8993                 AND po.cancel_reason IS NULL -- belt/suspenders
8994                 AND lid.recv_time IS NULL
8995                 AND po.state = 'on-order'
8996             ORDER BY 1, 2, 3, 4, 5
8997
8998                 </oils_persist:source_definition>
8999                 <fields>
9000                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9001                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9002                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9003                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9004                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9005                 </fields>
9006                 <links>
9007                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9008                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9009                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9010                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9011                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9012                 </links>
9013         </class>
9014
9015         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9016                 <oils_persist:source_definition>
9017
9018             SELECT 
9019                 li.id AS lineitem, 
9020                 (
9021                     SELECT COUNT(lid.id) 
9022                     FROM acq.lineitem_detail lid
9023                     WHERE lineitem = li.id
9024                 ) AS item_count,
9025                 (
9026                     SELECT COUNT(lid.id) 
9027                     FROM acq.lineitem_detail lid
9028                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9029                 ) AS recv_count,
9030                 (
9031                     SELECT COUNT(lid.id) 
9032                     FROM acq.lineitem_detail lid
9033                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9034                 ) AS cancel_count,
9035                 (
9036                     SELECT COUNT(lid.id) 
9037                     FROM acq.lineitem_detail lid
9038                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9039                     WHERE NOT debit.encumbrance AND lineitem = li.id
9040                 ) AS invoice_count,
9041                 (
9042                     SELECT COUNT(DISTINCT(lid.id)) 
9043                     FROM acq.lineitem_detail lid
9044                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9045                     WHERE lineitem = li.id
9046                 ) AS claim_count,
9047                 (
9048                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9049                     FROM acq.lineitem_detail lid
9050                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9051                 ) AS estimated_amount,
9052                 (
9053                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9054                     FROM acq.lineitem_detail lid
9055                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9056                     WHERE debit.encumbrance AND lineitem = li.id
9057                 ) AS encumbrance_amount,
9058                 (
9059                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9060                     FROM acq.lineitem_detail lid
9061                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9062                     WHERE NOT debit.encumbrance AND lineitem = li.id
9063                 ) AS paid_amount
9064
9065                 FROM acq.lineitem AS li
9066         </oils_persist:source_definition>
9067                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9068                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9069                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9070                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9071                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9072                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9073                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9074                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9075                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9076                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9077                 </fields>
9078                 <links>
9079                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9080                 </links>
9081     </class>
9082
9083
9084         <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">
9085                 <oils_persist:source_definition>
9086
9087                         SELECT  t.*
9088                           FROM  action.transit_copy t
9089                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9090                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9091                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9092
9093                 </oils_persist:source_definition>
9094                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9095                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9096                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9097                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9098                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9099                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9100                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9101                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9102                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9103                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9104                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9105                 </fields>
9106                 <links>
9107                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9108                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9109                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9110                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9111                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9112                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9113                 </links>
9114         </class>
9115
9116     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9117                 <oils_persist:source_definition>
9118
9119         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9120                 SELECT
9121                         cp.id as copy,
9122                         COUNT(circ.id),
9123                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9124                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9125                 FROM
9126                         asset.copy cp
9127                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9128                 GROUP BY 1, 3, 4
9129                 UNION
9130                 SELECT
9131                         cp.id as copy,
9132                         COUNT(circ.id),
9133                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9134                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9135                 FROM
9136                         asset.copy cp
9137                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9138                 GROUP BY 1, 3, 4
9139                 UNION
9140                 SELECT
9141                         id as copy,
9142                         circ_count,
9143                         -1 AS year,
9144                         false as is_renewal
9145                 FROM
9146                         extend_reporter.legacy_circ_count
9147         )x GROUP BY 1, 3, 4
9148
9149                 </oils_persist:source_definition>
9150         <fields>
9151             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9152             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9153             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9154             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9155         </fields>
9156                 <links>
9157                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9158                 </links>
9159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9160                         <actions>
9161                                 <retrieve/>
9162                         </actions>
9163                 </permacrud>
9164     </class>
9165
9166         <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">
9167                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9168                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9169                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9170                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9171                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9172                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9173                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9174                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9175                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9176                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9177                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9178                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9179                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9180                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9181                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9182                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9183                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9184                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9185                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9186                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9187                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9188                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9189                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9190                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9191                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9192                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9193                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9194                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9195                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9196                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9197                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9198                 </fields>
9199                 <links>
9200                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9201                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9202                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9203                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9204                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9205                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9206                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9207                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9208                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9209                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9210                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9211                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9212                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9213                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9214                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9215                 </links>
9216         </class>
9217
9218     <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">
9219         <fields oils_persist:primary="id">
9220             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9221             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9222             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9223             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9224             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9225             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9226             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9227             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9228             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9229             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9230             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9231             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9232             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9233             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9234             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9235             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9236             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9237             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9238             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9239             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9240             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9241             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9242             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9243             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9244             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9245             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9246             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9247             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9248             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9249             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9250             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9251             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9252             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9253             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9254         </fields>
9255         <links>
9256             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9257             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9258             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9259             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9260             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9261         </links>
9262     </class>
9263
9264     <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">
9265         <fields oils_persist:primary="id">
9266             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9267             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9268             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9269             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9270         </fields>
9271         <links>
9272             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9273             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9274         </links>
9275     </class>
9276
9277     <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">
9278         <fields oils_persist:primary="owning_lib">
9279             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9280             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9281             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9282         </fields>
9283         <links>
9284             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9285         </links>
9286     </class>
9287
9288     <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">
9289         <fields oils_persist:primary="id">
9290             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9291             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9292             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9293             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9294             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9295         </fields>
9296         <links>
9297             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9298             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9299             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9300         </links>
9301     </class>
9302
9303     <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">
9304         <fields oils_persist:primary="circ_lib">
9305             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9306             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9307             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9308             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9309         </fields>
9310         <links>
9311             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9312             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9313         </links>
9314     </class>
9315
9316     <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">
9317         <fields oils_persist:primary="id">
9318             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9319             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9320             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9321             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9322             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9323         </fields>
9324         <links>
9325             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9326             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9327             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9328         </links>
9329     </class>
9330
9331     <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">
9332         <fields oils_persist:primary="home_ou">
9333             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9334             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9335             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9336             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9337         </fields>
9338         <links>
9339             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9340             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9341         </links>
9342     </class>
9343         <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">
9344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9345                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9346                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9347                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9348                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9349                 </fields>
9350                 <links>
9351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9352                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9353                 </links>
9354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9355                         <actions>
9356                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9357                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9358                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9359                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9360                         </actions>
9361                 </permacrud>
9362         </class>
9363         <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">
9364                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9365                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9366                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9367                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9368                 </fields>
9369                 <links>
9370                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9371                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9372                         </links>
9373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9374                 <actions>
9375                                 <create permission="ADMIN_ACQ_FUND_TAG">
9376                                         <context link="tag" field="owner"/>
9377                                 </create>
9378                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9379                                         <context link="tag" field="owner"/>
9380                                 </retrieve>
9381                                 <update permission="ADMIN_ACQ_FUND_TAG">
9382                                         <context link="tag" field="owner"/>
9383                                 </update>
9384                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9385                                         <context link="tag" field="owner"/>
9386                                 </delete>
9387                         </actions>
9388                 </permacrud>
9389         </class>
9390         <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">
9391                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9393                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9394                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9395                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9396                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9397                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9398                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9399                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9400                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9401                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9402                 </fields>
9403                 <links>
9404                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9405                 </links>
9406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9407                         <actions>
9408                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9409                                 <retrieve/>
9410                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9411                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9412                         </actions>
9413                 </permacrud>
9414         </class>
9415
9416         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
9417                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9418                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9419                         <field name="date_applied" reporter:datatype="timestamp"/>
9420                         <field name="org" reporter:datatype="org_unit"/>
9421                         <field name="original_value" reporter:datatype="text"/>
9422                         <field name="new_value" reporter:datatype="text"/>
9423                         <field name="field_name" reporter:datatype="link"/>
9424                 </fields>
9425                 <links>
9426                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9427                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9428                 </links>
9429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9430                         <actions>
9431                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9432                                 <retrieve/>
9433                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9434                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9435                         </actions>
9436                 </permacrud>
9437         </class>
9438         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
9439                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9440                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9441                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9442                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9443                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9444                 </fields>
9445                 <links>
9446                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9447                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9448                 </links>
9449         </class>
9450         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
9451                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9452                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9453                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9454                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9455                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9456                 </fields>
9457                 <links>
9458                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9459                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9460                 </links>
9461         </class>
9462
9463
9464         <!-- ********************************************************************************************************************* -->
9465
9466 </IDL>
9467
9468 <!--
9469     vim:noet:ts=4:sw=4:
9470 -->