]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Copy Location Groups : sort to top option
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" 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                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2707                 </fields>
2708                 <links>
2709                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2710                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2711                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2712                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2713                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2714                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2715                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2716                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2717                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2718                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2719                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2720                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2721                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2722                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2723                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2724                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2725                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2726                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2727                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2728                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2729                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2730                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2731                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2732                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2733                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2734                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2735                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2736                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2737                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2738                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2739                 </links>
2740         </class>
2741         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2743                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2744                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2745                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2746                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2747                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2748                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2749                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2750                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2751         </fields>
2752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2753                         <actions>
2754                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2755                                 <retrieve/>
2756                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2757                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2758                         </actions>
2759                 </permacrud>
2760         </class>
2761         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
2762                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2763                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2764                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2765                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2766                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2767         </fields>
2768         <links>
2769                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2770                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2771                 </links>
2772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773                         <actions>
2774                                 <retrieve permission="RUN_REPORTS">
2775                                         <context link="usr" field="home_ou" />
2776                                 </retrieve>
2777                         </actions>
2778                 </permacrud>
2779         </class>
2780         <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">
2781                 <fields oils_persist:primary="name">
2782                         <field name="name" reporter:datatype="text"/>
2783                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2784                 </fields>
2785                 <links/>
2786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2787                         <actions>
2788                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2789                                 <retrieve/>
2790                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2791                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2792                         </actions>
2793                 </permacrud>
2794         </class>
2795         <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">
2796                 <fields oils_persist:primary="name">
2797                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2798                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2799                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2800                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2801                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2802                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2803                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2804                 </fields>
2805                 <links>
2806                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2807                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2808                 </links>
2809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2810                         <actions>
2811                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2812                                 <retrieve/>
2813                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2814                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2815                         </actions>
2816                 </permacrud>
2817         </class>
2818         <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">
2819                 <fields oils_persist:primary="name">
2820                         <field name="name" reporter:datatype="text"/>
2821                         <field name="label" reporter:datatype="text"/>
2822                         <field name="description" reporter:datatype="text"/>
2823                         <field name="datatype" reporter:datatype="text"/>
2824                         <field name="view_perm" reporter:datatype="link"/>
2825                         <field name="update_perm" reporter:datatype="link"/>
2826                         <field name="fm_class" reporter:datatype="text"/>
2827                         <field name="grp" reporter:datatype="link"/>
2828                 </fields>
2829                 <links>
2830                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2831                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2832                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2833                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2834                 </links>
2835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2836                         <actions>
2837                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2838                                 <retrieve/>
2839                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2840                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2841                         </actions>
2842                 </permacrud>
2843         </class>
2844         <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">
2845                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2846                         <field name="id" />
2847                         <field name="name"  reporter:datatype="text"/>
2848                         <field name="org_unit" reporter:datatype="org_unit"/>
2849                         <field name="value"  reporter:datatype="text"/>
2850                 </fields>
2851                 <links>
2852                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2853                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2854                 </links>
2855         </class>
2856         <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">
2857                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2858                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2859                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2860                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2861                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2862                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2863                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2864                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2865                 </fields>
2866                 <links>
2867                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2868                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2869                 </links>
2870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2871             <actions>
2872                 <create permission="CREATE_COPY_NOTE">
2873                     <context link="owning_copy" field="circ_lib"/>
2874                 </create>
2875                 <retrieve permission="VIEW_COPY_NOTES">
2876                     <context link="owning_copy" field="circ_lib"/>
2877                 </retrieve>
2878                 <update permission="UPDATE_COPY_NOTE">
2879                     <context link="owning_copy" field="circ_lib"/>
2880                 </update>
2881                 <delete permission="DELETE_COPY_NOTE">
2882                     <context link="owning_copy" field="circ_lib"/>
2883                 </delete>
2884             </actions>
2885         </permacrud>
2886         </class>
2887         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2888                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2889                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2890                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2891                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2892                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2893                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2894                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2895                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2896                 </fields>
2897                 <links>
2898                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2899                 </links>
2900         </class>
2901         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2902                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2903                         <field name="fingerprint"  reporter:datatype="text"/>
2904                         <field name="id" reporter:datatype="id" />
2905                         <field name="master_record" reporter:datatype="link"/>
2906                         <field name="mods"  reporter:datatype="text"/>
2907                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2908                 </fields>
2909                 <links>
2910                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2911                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2912                 </links>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2916                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2917                         <field name="name"  reporter:datatype="text"/>
2918                 </fields>
2919                 <links/>
2920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2921             <actions>
2922                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2923                 <retrieve/>
2924                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2925                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2926             </actions>
2927         </permacrud>
2928         </class>
2929         <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">
2930                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2931                         <field name="code"  reporter:datatype="text"/>
2932                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2933                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2934                 </fields>
2935                 <links/>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <create permission="CREATE_PERM" global_required="true"/>
2939                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2940                 <update permission="UPDATE_PERM" global_required="true"/>
2941                 <delete permission="DELETE_PERM" global_required="true"/>
2942             </actions>
2943         </permacrud>
2944         </class>
2945         <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">
2946                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2947                         <field name="id" reporter:datatype="id" />
2948                         <field name="metarecord" reporter:datatype="link"/>
2949                         <field name="source" reporter:datatype="link"/>
2950                 </fields>
2951                 <links>
2952                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2953                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2954                 </links>
2955         </class>
2956         <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">
2957                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2958                         <field name="id" reporter:datatype="id" />
2959                         <field name="field" reporter:datatype="link"/>
2960                         <field name="source" reporter:datatype="link"/>
2961                         <field name="value"  reporter:datatype="text"/>
2962                 </fields>
2963                 <links>
2964                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2965                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2966                 </links>
2967         </class>
2968         <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">
2969                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
2970                         <field name="id" reporter:datatype="id" />
2971                         <field name="value" reporter:datatype="text"/>
2972                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2973                 </fields>
2974                 <links>
2975                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
2976                 </links>
2977         </class>
2978         <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">
2979                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
2980                         <field name="id" reporter:datatype="id" />
2981                         <field name="entry" reporter:datatype="link"/>
2982                         <field name="def" reporter:datatype="link"/>
2983                         <field name="source" reporter:datatype="link"/>
2984                 </fields>
2985                 <links>
2986                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
2987                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
2988                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2989                 </links>
2990         </class>
2991         <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">
2992                 <oils_persist:source_definition>
2993                         SELECT * FROM metabib.author_field_entry
2994                                                 UNION ALL
2995                         SELECT * FROM metabib.keyword_field_entry
2996                                                 UNION ALL
2997                         SELECT * FROM metabib.identifier_field_entry
2998                                                 UNION ALL
2999                         SELECT * FROM metabib.title_field_entry
3000                                                 UNION ALL
3001                         SELECT * FROM metabib.subject_field_entry
3002                                                 UNION ALL
3003                         SELECT * FROM metabib.series_field_entry
3004                 </oils_persist:source_definition>
3005                 <fields>
3006                         <field name="field" reporter:datatype="link"/>
3007                         <field name="id" reporter:datatype="id" />
3008                         <field name="source" reporter:datatype="link"/>
3009                         <field name="value"  reporter:datatype="text"/>
3010                 </fields>
3011                 <links>
3012                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3013                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3014                 </links>
3015         </class>
3016         <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">
3017                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3018                         <field name="field" reporter:datatype="link"/>
3019                         <field name="id" reporter:datatype="id" />
3020                         <field name="source" reporter:datatype="link"/>
3021                         <field name="value"  reporter:datatype="text"/>
3022                 </fields>
3023                 <links>
3024                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3025                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3026                 </links>
3027         </class>
3028         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3029                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3030                         <field name="accepting_usr" reporter:datatype="link"/>
3031                         <field name="amount" reporter:datatype="money" />
3032                         <field name="amount_collected" reporter:datatype="money" />
3033                         <field name="cash_drawer" reporter:datatype="link"/>
3034                         <field name="id" reporter:datatype="id" />
3035                         <field name="note"  reporter:datatype="text"/>
3036                         <field name="payment_ts" reporter:datatype="timestamp"/>
3037                         <field name="xact" reporter:datatype="link"/>
3038                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3039                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3040                 </fields>
3041                 <links>
3042                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3043                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3044                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3045                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3046                 </links>
3047         </class>
3048         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3049                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3050                         <field name="accepting_usr" reporter:datatype="link"/>
3051                         <field name="amount" reporter:datatype="money" />
3052                         <field name="amount_collected" reporter:datatype="money" />
3053                         <field name="id" reporter:datatype="id" />
3054                         <field name="note"  reporter:datatype="text"/>
3055                         <field name="payment_ts" reporter:datatype="timestamp"/>
3056                         <field name="xact" reporter:datatype="link"/>
3057                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3058                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3059                 </fields>
3060                 <links>
3061                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3062                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3063                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3064                 </links>
3065         </class>
3066         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3067                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3068                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3069                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3070                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3071                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3072                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3073                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3074                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3075                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3076                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3077                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3078                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3079                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3080                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3081                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3082                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3083                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3084                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3085                 </fields>
3086                 <links>
3087                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3088                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3089                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3090                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3091                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3092                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3093                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3094                 </links>
3095         </class>
3096
3097         <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">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3099                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3100                         <field name="name"  reporter:datatype="text"/>
3101                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3102                         <field name="block_list" reporter:datatype="text"/>
3103                         <field name="staff_alert" reporter:datatype="bool"/>
3104                         <field name="org_depth" reporter:datatype="int"/>
3105                 </fields>
3106                 <links/>
3107         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3108             <actions>
3109                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3110                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3111                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3112                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3113             </actions>
3114         </permacrud>
3115         </class>
3116         <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">
3117                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3118                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3119                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3120                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3121                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3122                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3123                 </fields>
3124                 <links>
3125                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3126                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3127                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3128         </links>
3129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3130             <actions>
3131                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3132                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3133                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3134                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3135             </actions>
3136         </permacrud>
3137         </class>
3138         <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">
3139                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3140                         <field name="holdable" reporter:datatype="bool"/>
3141                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3142                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3143                         <field name="opac_visible" reporter:datatype="bool"/>
3144             <field name="copy_active" reporter:datatype="bool"/>
3145             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3146                 </fields>
3147                 <links/>
3148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3149             <actions>
3150                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3151                 <retrieve/>
3152                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3153                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3154             </actions>
3155         </permacrud>
3156         </class>
3157         <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">
3158                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3159                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3160                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3161                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3162                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3163                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3164                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3165                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3166                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3167                 </fields>
3168                 <links>
3169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3170                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3171                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3172                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3173                 </links>
3174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3175                         <actions>
3176                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3177                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3178                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3179                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3180                         </actions>
3181                 </permacrud>
3182         </class>
3183         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3184                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3185                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3186                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3187                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3188                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3189                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3190                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3191                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3192                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3193                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3194                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3195                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3196                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3197                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3198                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3199                 </fields>
3200                 <links>
3201                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3202                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3203                 </links>
3204         </class>
3205         <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">
3206                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3207                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3208                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3209                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3210                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3211                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3212                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3213                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3214                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3215                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3216                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3217                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3218                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3219                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3220                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3221                 </fields>
3222                 <links>
3223                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3224                 </links>
3225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3226                         <actions>
3227                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3228                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3229                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3230                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3231                         </actions>
3232                 </permacrud>
3233         </class>
3234
3235
3236         <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">
3237                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3238                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3239                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3240                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3241                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3242                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3243                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3244                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3245                 </fields>
3246                 <links>
3247                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3248                 </links>
3249         </class>
3250
3251         <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">
3252                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3253                         <field name="call_number" />
3254                         <field name="create_date" reporter:datatype="timestamp"/>
3255                         <field name="creator" reporter:datatype="link"/>
3256                         <field name="id" reporter:datatype="id" />
3257                         <field name="pub" reporter:datatype="bool"/>
3258                         <field name="title"  reporter:datatype="text"/>
3259                         <field name="value"  reporter:datatype="text"/>
3260                 </fields>
3261                 <links>
3262                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3263                 </links>
3264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3265             <actions>
3266                 <create permission="CREATE_VOLUME_NOTE">
3267                     <context link="call_number" field="owning_lib"/>
3268                 </create>
3269                 <retrieve permission="VIEW_VOLUME_NOTES">
3270                     <context link="call_number" field="owning_lib"/>
3271                 </retrieve>
3272                 <update permission="UPDATE_VOLUME_NOTE">
3273                     <context link="call_number" field="owning_lib"/>
3274                 </update>
3275                 <delete permission="DELETE_VOLUME_NOTE">
3276                     <context link="call_number" field="owning_lib"/>
3277                 </delete>
3278             </actions>
3279         </permacrud>
3280         </class>
3281         <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">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3283                         <field name="create_date" reporter:datatype="timestamp"/>
3284                         <field name="creator" reporter:datatype="link"/>
3285                         <field name="edit_date" reporter:datatype="timestamp"/>
3286                         <field name="editor" reporter:datatype="link"/>
3287                         <field name="id" reporter:datatype="id" />
3288                         <field name="record" reporter:datatype="link"/>
3289                         <field name="value" reporter:datatype="text"/>
3290                 </fields>
3291                 <links>
3292                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3293                 </links>
3294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3295             <actions>
3296                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3297                 <retrieve/>
3298                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3299                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3300             </actions>
3301         </permacrud>
3302         </class>
3303         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3304         <oils_persist:source_definition>
3305 SELECT  usr,
3306         SUM(
3307             CASE
3308                 WHEN (
3309                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3310                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3311                 ) THEN 1
3312                 ELSE 0
3313             END
3314         ) AS out,
3315
3316         SUM(
3317             CASE
3318                 WHEN (
3319                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3320                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3321                 ) THEN 1
3322                 ELSE 0
3323             END
3324         ) AS overdue,
3325
3326         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3327         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3328         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3329   FROM  action.circulation
3330   WHERE checkin_time IS NULL
3331   GROUP BY 1
3332         </oils_persist:source_definition>
3333         <fields oils_persist:primary="usr">
3334             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3335             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3336             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3337             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3338             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3339             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3340         </fields>
3341         <links>
3342             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3343         </links>
3344         </class>
3345         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3346         <oils_persist:source_definition>
3347 SELECT  usr,
3348         ARRAY_TO_STRING(ARRAY_ACCUM(
3349             CASE
3350                 WHEN (
3351                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3352                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3353                 ) THEN id
3354                 ELSE 0
3355             END
3356         ),',') AS out,
3357
3358         ARRAY_TO_STRING(ARRAY_ACCUM(
3359             CASE
3360                 WHEN (
3361                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3362                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3363                 ) THEN id
3364                 ELSE 0
3365             END
3366         ),',') AS overdue,
3367
3368         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3369         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3370         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3371   FROM  action.circulation
3372   WHERE checkin_time IS NULL
3373   GROUP BY 1
3374         </oils_persist:source_definition>
3375         <fields oils_persist:primary="usr">
3376             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3377             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3378             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3379             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3380             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3381             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3382         </fields>
3383         <links>
3384             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3385         </links>
3386         </class>
3387         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3388                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3389                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3390                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3391                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3392                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3393                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3394                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3395                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3396                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3397                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3398                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3399                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3400                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3401                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3402                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3403                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3404                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3405                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3406                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3407                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3408                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3409                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3410                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3411                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3412                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3413                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3414                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3415                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3416                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3417                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3418                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3419                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3420                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3421                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3422                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3423                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3424                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3425                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3426                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3427                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3428                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3429                 </fields>
3430                 <links>
3431                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3432                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3433                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3434                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3435                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3437                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3438                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3439                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3440                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3441                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3442                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3443                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3444                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3445                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3446                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3447                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3448                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3449                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3450                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3451                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3452                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3453                 </links>
3454         </class>
3455         <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">
3456                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3457                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3458                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3459                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3460                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3461                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3462                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3463                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3464                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3465                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3466                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3467                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3468                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3469                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3470                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3471                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3472                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3473                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3474                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3475                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3476                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3477                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3478                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3479                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3480                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3481                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3482                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3483                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3484                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3485                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3486                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3487                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3488                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3489                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3490                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3491                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3492                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3493                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3494                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3495                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3496                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3497                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3498                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3499                 </fields>
3500                 <links>
3501                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3502                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3503                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3504                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3505                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3506                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3507                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3508                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3509                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3510                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3511                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3512                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3513                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3514                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3515                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3516                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3517                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3518                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3519                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3520                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3521                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3522                 </links>
3523         </class>
3524         <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">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3526                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3527                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3528                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3529                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3530                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3531                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3532                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3533                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3534                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3535                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3536                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3537                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3538                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3539                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3540                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3541                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3542                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3543                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3544                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3545                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3546                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3547                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3548                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3549                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3550                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3551                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3552                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3553                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3554                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3555                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3556                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3557                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3558                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3559                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3560                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3561                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3562                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3563                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3564                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3565                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3566                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3567                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3568                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3569                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3570                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3571                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3572                 </fields>
3573                 <links>
3574                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3575                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3576                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3577                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3578                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3579                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3580                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3581                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3582                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3583                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3584                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3585                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3586                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3587                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3588                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3589                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3590                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3591                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3592                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3593                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3594                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3595                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3596                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3597                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3598                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3599                 </links>
3600         </class>
3601
3602         <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">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3604                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3605                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3606                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3607                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3608                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3609                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3610                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3611                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3612                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3613                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3614                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3615                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3616                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3617                 </fields>
3618                 <links>
3619                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3620                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3621                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3622                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3623                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3624                 </links>
3625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3626                         <actions>
3627                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3628                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3629                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3630                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3631                         </actions>
3632                 </permacrud>
3633         </class>
3634
3635         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3636                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3637                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3638                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3639                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3640                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3641                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3642                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3643                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3644                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3645                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3646                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3647                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3648                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3649                 </fields>
3650                 <links>
3651                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3652                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3653                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3654                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3655                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3656                 </links>
3657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3658                         <actions>
3659                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3660                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3661                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3662                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3663                         </actions>
3664                 </permacrud>
3665         </class>
3666         
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3669                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3670                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3671                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3672                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3673                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3674                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3675                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3676                 </fields>
3677                 <links>
3678                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3679                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3680                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3681                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3682                 </links>
3683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3684                         <actions>
3685                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3686                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3687                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3688                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3689                         </actions>
3690                 </permacrud>
3691         </class>
3692         
3693         <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">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3695                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3696                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3697                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3698                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3699                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3700                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3701                 </fields>
3702                 <links>
3703                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3704                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3705                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3706                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3707                 </links>
3708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3709                         <actions>
3710                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3711                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3712                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3713                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3714                         </actions>
3715                 </permacrud>
3716         </class>
3717         
3718         <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">
3719                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3720                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3721                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3722                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3723                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3724                 </fields>
3725                 <links>
3726                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3727                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3728                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3729                 </links>
3730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3731                         <actions>
3732                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3733                     <context link="resource" field="owner" />
3734                 </create>
3735                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3736                     <context link="resource" field="owner" />
3737                 </retrieve>
3738                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3739                     <context link="resource" field="owner" />
3740                 </update>
3741                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3742                     <context link="resource" field="owner" />
3743                 </delete>
3744                         </actions>
3745                 </permacrud>
3746         </class>
3747         
3748         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3749                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3750                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3751                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3752                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3753                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3754                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3755                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3756                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3757                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3758                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3759                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3760                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3761                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3762                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3763                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3764                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3765                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3766                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3767                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3768                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3769                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3770                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3771                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3772                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3773                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3774                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3775                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3776                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3777                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3778                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3779                 </fields>
3780                 <links>
3781                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3782                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3783                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3784                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3785                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3786                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3787                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3788                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3789                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3790                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3791                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3792                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3793                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3794                 </links>
3795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3796                         <actions>
3797                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3798                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3799                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3800                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3801                         </actions>
3802                 </permacrud>
3803         </class>
3804         
3805         <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">
3806                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3807                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3808                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3809                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3810                 </fields>
3811                 <links>
3812                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3813                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3814                 </links>
3815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3816                         <actions>
3817                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3818                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3819                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3820                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3821                         </actions>
3822                 </permacrud>
3823         </class>
3824
3825         <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">
3826                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3827                         <field name="bucket" reporter:datatype="link"/>
3828                         <field name="id" reporter:datatype="id" />
3829                         <field name="target_call_number" reporter:datatype="link" />
3830                         <field name="create_time" reporter:datatype="timestamp" />
3831                         <field name="pos" reporter:datatype="int" />
3832                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3833                 </fields>
3834                 <links>
3835                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3836                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3837             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3838                 </links>
3839         </class>
3840         <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">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3842                         <field name="id" reporter:datatype="id" />
3843                         <field name="item" reporter:datatype="link"/>
3844                         <field name="note" reporter:datatype="text" />
3845                 </fields>
3846                 <links>
3847                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3848                 </links>
3849         </class>
3850         <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">
3851                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3852                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3853                         <field name="btype" reporter:datatype="text"/>
3854                         <field name="id" reporter:datatype="id" />
3855                         <field name="name" reporter:datatype="text"/>
3856                         <field name="description" reporter:datatype="text"/>
3857                         <field name="owner" reporter:datatype="link"/>
3858                         <field name="pub" reporter:datatype="bool"/>
3859                         <field name="create_time" reporter:datatype="timestamp" />
3860                 </fields>
3861                 <links>
3862                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3863                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3864                 </links>
3865         </class>
3866         <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">
3867                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3868                         <field name="id" reporter:datatype="id" />
3869                         <field name="bucket" reporter:datatype="link"/>
3870                         <field name="note" reporter:datatype="text" />
3871                 </fields>
3872                 <links>
3873                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3874                 </links>
3875         </class>
3876         <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">
3877                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3878                         <field name="hold" reporter:datatype="link"/>
3879                         <field name="id" reporter:datatype="id" />
3880                         <field name="target_copy" reporter:datatype="link"/>
3881                 </fields>
3882                 <links>
3883                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3884                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3885                 </links>
3886         </class>
3887         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3889                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3890                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3891                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3892                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3893                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3894                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3895                 </fields>
3896                 <links>
3897                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3898                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3899                 </links>
3900         </class>
3901         <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">
3902                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3903                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3904                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3905                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3906                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3907                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3908                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3909                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3910                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3911                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3912                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3913                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3914                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
3915                 </fields>
3916                 <links>
3917                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3918                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3919                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3920                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3921                 </links>
3922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3923             <actions>
3924                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3925                 <retrieve/>
3926                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3927                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3928             </actions>
3929         </permacrud>
3930         </class>
3931         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
3933                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3934                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3935                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3936                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
3937             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3938             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
3939             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3940                 </fields>
3941                 <links>
3942                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3943                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
3944                 </links>
3945         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3946             <actions>
3947                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3948                 <retrieve/>
3949                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3950                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3951             </actions>
3952         </permacrud>
3953         </class>
3954         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
3955                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
3956                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3957             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
3958             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
3959                 </fields>
3960                 <links>
3961                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
3962                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3963                 </links>
3964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3965             <actions>
3966                 <create permission="ADMIN_COPY_LOCATION_GROUP">
3967                                         <context link="lgroup" field="owner" />
3968                 </create>
3969                 <retrieve/>
3970                 <update permission="ADMIN_COPY_LOCATION_GROUP">
3971                                         <context link="lgroup" field="owner" />
3972                 </update>
3973                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
3974                                         <context link="lgroup" field="owner" />
3975                 </delete>
3976             </actions>
3977         </permacrud>
3978         </class>
3979
3980     <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">
3981         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3982             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3983             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3984             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3985             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3986         </fields>
3987         <links>
3988             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3989             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3990         </links>
3991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3992             <actions>
3993                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3994                 <retrieve/>
3995                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3996                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3997             </actions>
3998         </permacrud>
3999     </class>
4000
4001         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4002                 <fields>
4003                         <field name="sre_id" oils_persist:virtual="true" />
4004                         <field name="location" oils_persist:virtual="true" />
4005                         <field name="owning_lib" oils_persist:virtual="true" />
4006                         <field name="basic_holdings" oils_persist:virtual="true" />
4007                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4008                         <field name="supplement_holdings" oils_persist:virtual="true" />
4009                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4010                         <field name="index_holdings" oils_persist:virtual="true" />
4011                         <field name="index_holdings_add" oils_persist:virtual="true" />
4012                         <field name="online" oils_persist:virtual="true" />
4013                         <field name="missing" oils_persist:virtual="true" />
4014                         <field name="incomplete" oils_persist:virtual="true" />
4015                 </fields>
4016         </class>
4017
4018         <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">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4020                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4021                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4022                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4023                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4024                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4025                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4026                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4027                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4028                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4029                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4030                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4031                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4032                 </fields>
4033                 <links>
4034                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4035                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4036                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4037                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4038                 </links>
4039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4040                         <actions>
4041                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4042                                 <retrieve/>
4043                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4044                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4045                         </actions>
4046                 </permacrud>
4047         </class>
4048
4049         <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">
4050                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4051                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4052                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4053                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4054                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4055                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4056                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4057                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4058                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4059                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4060                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4061                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4062                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4063                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4064                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4065                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4066                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4067                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4068                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4069                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4070                 </fields>
4071                 <links>
4072                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4073                 </links>
4074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4075                         <actions>
4076                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4077                                         <context link="subscription" field="owning_lib" />
4078                                 </create>
4079                                 <retrieve />
4080                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4081                                         <context link="subscription" field="owning_lib" />
4082                                 </update>
4083                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4084                                         <context link="subscription" field="owning_lib" />
4085                                 </delete>
4086                         </actions>
4087                 </permacrud>
4088         </class>
4089
4090         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4091                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4092                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4093                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4094                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4095                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4096                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4097                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4098                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4099                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4100                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4101                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4102                 </fields>
4103                 <links>
4104                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4105                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4106                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4107                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4108                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4109                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4114                                 <retrieve />
4115                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4116                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4117                         </actions>
4118                 </permacrud>
4119         </class>
4120
4121         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4122                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4123                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4124                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4125                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4126                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4127                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4128                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4129                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4130                 </fields>
4131                 <links>
4132                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4133                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4134                 </links>
4135         </class>
4136
4137         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4138                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4139                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4140                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4141                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4142                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4143                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4144                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4145                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4146                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4147                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4148                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4149                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4150                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4151                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4152                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4153                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4154                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4155                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4156                 </fields>
4157                 <links>
4158                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4159                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4160                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4161                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4162                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4163                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4164                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4165                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4166                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4167                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4168                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4169                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4170                 </links>
4171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4172                         <actions>
4173                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4174                                 <retrieve />
4175                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4176                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4177                         </actions>
4178                 </permacrud>
4179         </class>
4180
4181         <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">
4182                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4183                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4184                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4185                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4186                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4187                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4188                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4189                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4190                 </fields>
4191                 <links>
4192                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4193                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4194                 </links>
4195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4196                         <actions>
4197                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4198                                         <context link="distribution" field="holding_lib" />
4199                                 </create>
4200                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4201                                         <context link="distribution" field="holding_lib" />
4202                                 </retrieve>
4203                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4204                                         <context link="distribution" field="holding_lib" />
4205                                 </update>
4206                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4207                                         <context link="distribution" field="holding_lib" />
4208                                 </delete>
4209                         </actions>
4210                 </permacrud>
4211         </class>
4212
4213         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4214                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4215                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4216                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4217                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4218                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4219                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4220                 </fields>
4221                 <links>
4222                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4223                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4224                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4225                 </links>
4226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4227                         <actions>
4228                                 <create permission="ADMIN_SERIAL_STREAM">
4229                                         <context link="distribution" field="holding_lib" />
4230                                 </create>
4231                                 <retrieve />
4232                                 <update permission="ADMIN_SERIAL_STREAM">
4233                                         <context link="distribution" field="holding_lib" />
4234                                 </update>
4235                                 <delete permission="ADMIN_SERIAL_STREAM">
4236                                         <context link="distribution" field="holding_lib" />
4237                                 </delete>
4238                         </actions>
4239                 </permacrud>
4240         </class>
4241
4242         <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">
4243                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4244                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4245                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4246                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4247                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4248                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4249                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4250                 </fields>
4251                 <links>
4252                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4253                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4254                 </links>
4255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4256                         <actions>
4257                                 <create permission="ADMIN_SERIAL_STREAM">
4258                                         <context link="stream" jump="distribution" field="holding_lib" />
4259                                 </create>
4260                                 <retrieve permission="RECEIVE_SERIAL">
4261                                         <context link="stream" jump="distribution" field="holding_lib" />
4262                                 </retrieve>
4263                                 <update permission="ADMIN_SERIAL_STREAM">
4264                                         <context link="stream" jump="distribution" field="holding_lib" />
4265                                 </update>
4266                                 <delete permission="ADMIN_SERIAL_STREAM">
4267                                         <context link="stream" jump="distribution" field="holding_lib" />
4268                                 </delete>
4269                         </actions>
4270                 </permacrud>
4271         </class>
4272
4273         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4274                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4275                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4276                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4277                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4278                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4279                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4280                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4281                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4282                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4283                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4284                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4285                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4286                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4287                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4288                 </fields>
4289                 <links>
4290                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4291                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4292                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4293                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4294                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4295                 </links>
4296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4297                         <actions>
4298                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4299                                         <context link="subscription" field="owning_lib" />
4300                                 </create>
4301                                 <retrieve/>
4302                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4303                                         <context link="subscription" field="owning_lib" />
4304                                 </update>
4305                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4306                                         <context link="subscription" field="owning_lib" />
4307                                 </delete>
4308                         </actions>
4309                 </permacrud>
4310         </class>
4311
4312         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4313                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4314                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4315                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4316                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4317                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4318                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4319                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4320                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4321                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4322                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4323                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4324                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4325                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4326                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4327                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4328                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4329                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4330                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4331                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4332                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4333                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4334                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4335                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4336                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4337                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4338                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4339                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4340                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4341                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4342                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4343                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4344                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4345                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4346                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4347                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4348                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4349                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4350                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4351                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4352                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4353                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4354                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4355                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4356                 </fields>
4357                 <links>
4358                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4359                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4360                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4361                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4362                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4363                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4364                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4365                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4366                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4367                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4368                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4369                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4370                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4371                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4372                 </links>
4373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4374                         <actions>
4375                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4376                                 <retrieve/>
4377                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4378                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4379                         </actions>
4380                 </permacrud>
4381         </class>
4382
4383         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4385                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4386                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4387                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4388                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4389                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4390                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4391                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4392                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4393                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4394                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4395                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4396                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4397                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4398                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4399                 </fields>
4400                 <links>
4401                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4402                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4403                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4404                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4405                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4406                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4407                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4408                 </links>
4409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4410                         <actions>
4411                                 <create permission="ADMIN_SERIAL_ITEM">
4412                                         <context link="stream" jump="distribution" field="holding_lib" />
4413                                 </create>
4414                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4415                                         <context link="stream" jump="distribution" field="holding_lib" />
4416                                 </retrieve>
4417                                 <update permission="ADMIN_SERIAL_ITEM">
4418                                         <context link="stream" jump="distribution" field="holding_lib" />
4419                                 </update>
4420                                 <delete permission="ADMIN_SERIAL_ITEM">
4421                                         <context link="stream" jump="distribution" field="holding_lib" />
4422                                 </delete>
4423                         </actions>
4424                 </permacrud>
4425         </class>
4426
4427         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4428                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4429                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4430                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4431                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4432                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4434                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4435                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4436                 </fields>
4437                 <links>
4438                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4439                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4440                 </links>
4441                 <!-- Not available via PCRUD at this time -->
4442         </class>
4443
4444         <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">
4445                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4446                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4447                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4448                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4449                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4450                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4451                 </fields>
4452                 <links>
4453                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4454                 </links>
4455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4456                         <actions>
4457                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4458                                         <context link="distribution" field="holding_lib" />
4459                                 </create>
4460                                 <retrieve/>
4461                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4462                                         <context link="distribution" field="holding_lib" />
4463                                 </update>
4464                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4465                                         <context link="distribution" field="holding_lib" />
4466                                 </delete>
4467                         </actions>
4468                 </permacrud>
4469         </class>
4470
4471         <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">
4472                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4473                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4474                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4475                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4476                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4477                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4478                 </fields>
4479                 <links>
4480                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4481                 </links>
4482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4483                         <actions>
4484                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4485                                         <context link="distribution" field="holding_lib" />
4486                                 </create>
4487                                 <retrieve/>
4488                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4489                                         <context link="distribution" field="holding_lib" />
4490                                 </update>
4491                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4492                                         <context link="distribution" field="holding_lib" />
4493                                 </delete>
4494                         </actions>
4495                 </permacrud>
4496         </class>
4497
4498         <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">
4499                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4500                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4501                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4502                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4503                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4504                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4505                 </fields>
4506                 <links>
4507                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4508                 </links>
4509                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4510                         <actions>
4511                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4512                                         <context link="distribution" field="holding_lib" />
4513                                 </create>
4514                                 <retrieve/>
4515                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4516                                         <context link="distribution" field="holding_lib" />
4517                                 </update>
4518                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4519                                         <context link="distribution" field="holding_lib" />
4520                                 </delete>
4521                         </actions>
4522                 </permacrud>
4523         </class>
4524
4525         <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">
4526                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4527                         <field name="id" reporter:datatype="id" />
4528                         <field name="owning_copy" reporter:datatype="link"/>
4529                         <field name="stat_cat" reporter:datatype="link"/>
4530                         <field name="stat_cat_entry" reporter:datatype="link"/>
4531                 </fields>
4532                 <links>
4533                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4534                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4535                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4536                 </links>
4537         </class>
4538         <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">
4539                 <fields oils_persist:primary="code">
4540                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4541                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4542                 </fields>
4543                 <links/>
4544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4545             <actions>
4546                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4547                 <retrieve/>
4548                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4549                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4550             </actions>
4551         </permacrud>
4552         </class>
4553         <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">
4554                 <fields oils_persist:primary="code">
4555                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4556                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4557                 </fields>
4558                 <links/>
4559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4560             <actions>
4561                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4562                 <retrieve/>
4563                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4564                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4565             </actions>
4566         </permacrud>
4567         </class>
4568         <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">
4569                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4570                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4571                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4572                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4573                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4574                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4575                 </fields>
4576                 <links>
4577             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4578         </links>
4579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4580             <actions>
4581                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4582                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4583                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4584                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4585             </actions>
4586         </permacrud>
4587         </class>
4588         <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">
4589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4590                         <field name="id" reporter:datatype="id" />
4591                         <field name="name" reporter:datatype="text"/>
4592                 </fields>
4593                 <links/>
4594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4595             <actions>
4596                 <create permission="CREATE_LASSO" global_required="true"/>
4597                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4598                 <update permission="UPDATE_LASSO" global_required="true"/>
4599                 <delete permission="DELETE_LASSO" global_required="true"/>
4600             </actions>
4601         </permacrud>
4602         </class>
4603         <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">
4604                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4605                         <field name="id" reporter:datatype="id" />
4606                         <field name="lasso" reporter:datatype="link"/>
4607                         <field name="org_unit" reporter:datatype="org_unit"/>
4608                 </fields>
4609                 <links>
4610                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4611                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4612                 </links>
4613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4614             <actions>
4615                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4616                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4617                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4618                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4619             </actions>
4620         </permacrud>
4621         </class>
4622         <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">
4623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4624                         <field name="id" reporter:datatype="id" />
4625                         <field name="from_org" reporter:datatype="org_unit"/>
4626                         <field name="to_org" reporter:datatype="org_unit"/>
4627                         <field name="prox" reporter:datatype="int" />
4628                 </fields>
4629                 <links>
4630                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4631                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4632                 </links>
4633         </class>
4634         <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">
4635                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4636                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4637                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4638                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4639                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4640                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4641                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4642                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4643                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4644                 </fields>
4645                 <links/>
4646         </class>
4647         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4648                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4649                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4650                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4651                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4652                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4653                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4654                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4655                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4656                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4657                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4658                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4659                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4660                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4661                 </fields>
4662                 <links>
4663                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4664                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4665                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4666                 </links>
4667         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4668             <actions>
4669                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4670                 <retrieve/>
4671                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4672                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4673             </actions>
4674         </permacrud>
4675         </class>
4676         <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">
4677                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4678                         <field name="address_type"  reporter:datatype="text"/>
4679                         <field name="city"  reporter:datatype="text"/>
4680                         <field name="country"  reporter:datatype="text"/>
4681                         <field name="county"  reporter:datatype="text"/>
4682                         <field name="id" reporter:datatype="id" />
4683                         <field name="org_unit" reporter:datatype="org_unit"/>
4684                         <field name="post_code"  reporter:datatype="text"/>
4685                         <field name="state"  reporter:datatype="text"/>
4686                         <field name="street1"  reporter:datatype="text"/>
4687                         <field name="street2"  reporter:datatype="text"/>
4688                         <field name="valid" reporter:datatype="bool"/>
4689                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4690                 </fields>
4691                 <links>
4692                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4693                 </links>
4694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4695             <actions>
4696                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4697                 <retrieve/>
4698                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4699                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4700             </actions>
4701         </permacrud>
4702         </class>
4703         <!-- A note: Please update alhr when updating ahr -->
4704         <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">
4705                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4706                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4707                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4708                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4709                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4710                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4711                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4712                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4713                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4714                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4715                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4716                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4717                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4718                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4719                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4720                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4721                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4722                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4723                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4724                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4725                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4726                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4727                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4728                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4729                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4730                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4731                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4732                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4733                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4734                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4735                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4736                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4737                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4738                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4739                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4740                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4741                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4742                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4743                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4744                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4745                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4746                 </fields>
4747                 <links>
4748                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4749                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4750                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4751                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4752                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4753                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4754                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4755                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4756                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4757                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4758                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4759                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4760                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4761                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4762                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4763                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4764                 </links>
4765         </class>
4766         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4767                 <oils_persist:source_definition>
4768                         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)
4769                 </oils_persist:source_definition>
4770                 <fields oils_persist:primary="id">
4771                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4772                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4773                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4774                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4775                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4776                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4777                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4778                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4779                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4780                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4781                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4782                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4783                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4784                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4785                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4786                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4787                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4788                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4789                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4790                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4791                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4792                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4793                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4794                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4795                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4796                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4797                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4798                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4799                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4800                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4801                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4802                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4803                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4804                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4805                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4806                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4807                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4808                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4809                 </fields>
4810                 <links>
4811                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4812                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4813                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4814                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4815                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4816                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4818                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4819                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4820                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4821                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4822                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4823                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4824                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4825                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4826                 </links>
4827         </class>
4828
4829         <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">
4830                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4831                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4832                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4833                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4834                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4835                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4836                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4837                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4838                 </fields>
4839                 <links>
4840                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4841                 </links>
4842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4843                         <actions>
4844                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4845                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4846                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4847                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4848                         </actions>
4849                 </permacrud>
4850         </class>
4851         <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">
4852                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4853                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4854                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4855                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4856                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4857                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4858                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4859                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4860                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4861                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4862                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4863                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4864                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4865                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4866                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4867                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4869                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4870                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4871                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4872                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4873                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4874                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4875                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4876                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4877                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4878                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4879                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4880                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4881                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4882                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4883                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4884                 </fields>
4885                 <links>
4886                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4887                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4888                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4889                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4890                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4891                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4892                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4893                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4894                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4895                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4896                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4897                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4898                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4899                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4900                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4901                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4902                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4903                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4904                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4905                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4906                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4907                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4908                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4909                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4910                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4911                 </links>
4912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4913             <actions>
4914                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4915                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4916                     <context field="id"/>
4917                     <context field="parent_ou"/>
4918                                 </retrieve>
4919                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4920                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4921             </actions>
4922         </permacrud>
4923         </class>
4924         <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">
4925                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4926                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4927                         <field name="btype" reporter:datatype="text"/>
4928                         <field name="id" reporter:datatype="id" />
4929                         <field name="name"  reporter:datatype="text"/>
4930                         <field name="description" reporter:datatype="text"/>
4931                         <field name="owner" reporter:datatype="link"/>
4932                         <field name="pub" reporter:datatype="bool"/>
4933                         <field name="create_time" reporter:datatype="timestamp" />
4934                 </fields>
4935                 <links>
4936                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4937                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4938                 </links>
4939         </class>
4940         <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">
4941                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4942                         <field name="id" reporter:datatype="id" />
4943                         <field name="bucket" reporter:datatype="link"/>
4944                         <field name="note" reporter:datatype="text" />
4945                 </fields>
4946                 <links>
4947                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4948                 </links>
4949         </class>
4950         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4951                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4952                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4953                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4954                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4955                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4956                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4957                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4958                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4959                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4960                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4961                 </fields>
4962                 <links>
4963                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4964                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4965                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4966                 </links>
4967         </class>
4968         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4969                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4970                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4971                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4972                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4973                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4974                 </fields>
4975                 <links>
4976                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4977                 </links>
4978         </class>
4979     <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">
4980         <fields oils_persist:primary="field">
4981             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4982             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4983             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4984         </fields>
4985         <links/>
4986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4987             <actions>
4988                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4989                 <retrieve />
4990                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4991                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4992             </actions>
4993         </permacrud>
4994     </class>
4995         <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">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4997                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4998                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4999                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5000                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5001                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5002                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5003                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5004                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5005                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5006                 </fields>
5007                 <links>
5008                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5009                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5010                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5011                 </links>
5012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5013             <actions>
5014                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5015                 <retrieve />
5016                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5017                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5018             </actions>
5019         </permacrud>
5020         </class>
5021         <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">
5022                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5023                         <field name="field" reporter:datatype="link"/>
5024                         <field name="id" reporter:datatype="id" />
5025                         <field name="source" reporter:datatype="link"/>
5026                         <field name="value"  reporter:datatype="text"/>
5027                 </fields>
5028                 <links>
5029                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5030                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5031                 </links>
5032         </class>
5033         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5034                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5035                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5036                         <field name="btype" reporter:datatype="text"/>
5037                         <field name="id" reporter:datatype="id" />
5038                         <field name="name"  reporter:datatype="text"/>
5039                         <field name="description" reporter:datatype="text"/>
5040                         <field name="owner" reporter:datatype="link"/>
5041                         <field name="pub" reporter:datatype="bool"/>
5042                         <field name="create_time" reporter:datatype="timestamp" />
5043                 </fields>
5044                 <links>
5045                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5046                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5047                 </links>
5048         </class>
5049         <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">
5050                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5051                         <field name="id" reporter:datatype="id" />
5052                         <field name="bucket" reporter:datatype="link"/>
5053                         <field name="note" reporter:datatype="text" />
5054                 </fields>
5055                 <links>
5056                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5057                 </links>
5058         </class>
5059         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5060                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5061                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5062                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5063                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5064                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5065                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5066                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5067                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5068                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5069                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5070                 </fields>
5071                 <links>
5072                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5073                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5074                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5075                 </links>
5076         </class>
5077         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5078                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5079                         <field name="id" reporter:datatype="id" />
5080                         <field name="ind1" />
5081                         <field name="ind2" />
5082                         <field name="record" />
5083                         <field name="subfield" />
5084                         <field name="tag" />
5085                         <field name="value" />
5086                 </fields>
5087                 <links>
5088                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5089                 </links>
5090         </class>
5091         <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">
5092                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5093                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5094                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5095                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5096                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5097                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5098                 </fields>
5099                 <links>
5100                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5101                 </links>
5102         </class>
5103         <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">
5104                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5105                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5106                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5107                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5108                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5109                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5110                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5111                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5112                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5113                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5114                 </fields>
5115                 <links>
5116                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5117                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5118                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5119                 </links>
5120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5121             <actions>
5122                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5123                 <retrieve/>
5124                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5125                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5126             </actions>
5127         </permacrud>
5128         </class>
5129         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5130                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5131                         <field name="create_date" reporter:datatype="timestamp"/>
5132                         <field name="creator" reporter:datatype="link"/>
5133                         <field name="edit_date" reporter:datatype="timestamp"/>
5134                         <field name="editor" reporter:datatype="link"/>
5135                         <field name="id" reporter:datatype="id" />
5136                         <field name="pub" reporter:datatype="bool"/>
5137                         <field name="record" reporter:datatype="link"/>
5138                         <field name="value"  reporter:datatype="text"/>
5139                 </fields>
5140                 <links>
5141                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5142                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5143                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5144                 </links>
5145         </class>
5146         <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">
5147                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5148                         <field name="balance_owed" reporter:datatype="money" />
5149                         <field name="total_owed" reporter:datatype="money" />
5150                         <field name="total_paid" reporter:datatype="money" />
5151                         <field name="usr" reporter:datatype="link"/>
5152                 </fields>
5153                 <links>
5154                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5155                 </links>
5156         </class>
5157         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5158                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5159                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5160                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5161                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5162                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5163                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5164                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5165                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5166                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5167                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5168                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5169                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5170                 </fields>
5171                 <links>
5172                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5173                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5174                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5175                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5176                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5177                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5178                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5179                 </links>
5180         </class>
5181         <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">
5182                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5183                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5184                         <field name="quality" reporter:datatype="int" />
5185                         <field name="source" reporter:datatype="text"/>
5186                         <field name="transcendant" reporter:datatype="bool"/>
5187                         <field name="can_have_copies" reporter:datatype="bool"/>
5188                 </fields>
5189                 <links/>
5190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5191             <actions>
5192                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5193                 <retrieve/>
5194                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5195                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5196             </actions>
5197         </permacrud>
5198         </class>
5199         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5200                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5201                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5202                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5203                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5204                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5205                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5206                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5207                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5208                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5209                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5210                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5211                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5212                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5213                 </fields>
5214                 <links>
5215                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5216                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5217                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5218                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5219                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5220                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5221                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5222                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5223                 </links>
5224         </class>
5225         <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">
5226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5227                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5228                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5229                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5230                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5231                 </fields>
5232                 <links>
5233                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5234                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5235                 </links>
5236         </class>
5237         <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">
5238                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5239                         <field name="bucket" reporter:datatype="link"/>
5240                         <field name="id" reporter:datatype="id" />
5241                         <field name="target_user" reporter:datatype="link"/>
5242                         <field name="create_time" reporter:datatype="timestamp" />
5243                         <field name="pos" reporter:datatype="int" />
5244                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5245                 </fields>
5246                 <links>
5247                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5248                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5249             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5250                 </links>
5251         </class>
5252         <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">
5253                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5254                         <field name="id" reporter:datatype="id" />
5255                         <field name="item" reporter:datatype="link"/>
5256                         <field name="note" reporter:datatype="text" />
5257                 </fields>
5258                 <links>
5259                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5260                 </links>
5261         </class>
5262         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5263                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5264                         <field name="balance_owed" reporter:datatype="money" />
5265                         <field name="total_owed" reporter:datatype="money" />
5266                         <field name="total_paid" reporter:datatype="money" />
5267                         <field name="usr" reporter:datatype="link"/>
5268                 </fields>
5269                 <links>
5270                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5271                 </links>
5272         </class>
5273         <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">
5274                 <fields oils_persist:primary="code" oils_persist:sequence="">
5275                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5276                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5277                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5278                 </fields>
5279                 <links/>
5280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5281             <actions>
5282                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5283                 <retrieve/>
5284                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5285                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5286             </actions>
5287         </permacrud>
5288         </class>
5289         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5290                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5291                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5292                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5293                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5294                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5295                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5296                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5297                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5298                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5299                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5300                 </fields>
5301                 <links>
5302                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5303                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5304                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5305                 </links>
5306         </class>
5307         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5308                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5309                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5310                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5311                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
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 ID" 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="xact" reltype="has_a" key="id" map="" class="mbt"/>
5323                 </links>
5324         </class>
5325         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5326                 <fields oils_persist:primary="id" oils_persist:sequence="">
5327                         <field name="checkin_lib" reporter:datatype="link"/>
5328                         <field name="checkin_staff" reporter:datatype="link"/>
5329                         <field name="checkin_time" reporter:datatype="timestamp"/>
5330                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5331                         <field name="circ_staff" reporter:datatype="link"/>
5332                         <field name="desk_renewal" reporter:datatype="bool"/>
5333                         <field name="due_date" reporter:datatype="timestamp"/>
5334                         <field name="duration" reporter:datatype="interval"/>
5335                         <field name="duration_rule" reporter:datatype="link"/>
5336                         <field name="fine_interval" reporter:datatype="interval"/>
5337                         <field name="id" reporter:datatype="id" />
5338                         <field name="max_fine" reporter:datatype="money" />
5339                         <field name="max_fine_rule" reporter:datatype="link"/>
5340                         <field name="opac_renewal" reporter:datatype="bool"/>
5341                         <field name="phone_renewal" reporter:datatype="bool"/>
5342                         <field name="recurring_fine" reporter:datatype="money" />
5343                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5344                         <field name="renewal_remaining" reporter:datatype="int" />
5345             <field name="grace_period" reporter:datatype="interval" />
5346                         <field name="stop_fines" reporter:datatype="text"/>
5347                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5348                         <field name="target_copy" reporter:datatype="link"/>
5349                         <field name="usr" reporter:datatype="link"/>
5350                         <field name="xact_finish" reporter:datatype="timestamp" />
5351                         <field name="xact_start" reporter:datatype="timestamp" />
5352                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5353                 </fields>
5354                 <links>
5355                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5356                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5357                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5358                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5359                 </links>
5360         </class>
5361         <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">
5362                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5363                         <field name="field" reporter:datatype="link"/>
5364                         <field name="id" reporter:datatype="id" />
5365                         <field name="source" reporter:datatype="link"/>
5366                         <field name="value" reporter:datatype="text"/>
5367                 </fields>
5368                 <links>
5369                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5370                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5371                 </links>
5372         </class>
5373         <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">
5374                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5375                         <field name="high" reporter:datatype="money" />
5376                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5377                         <field name="low" reporter:datatype="money" />
5378                         <field name="name" reporter:datatype="text"/>
5379                         <field name="normal" reporter:datatype="money" />
5380                         <field name="recurrence_interval" reporter:datatype="interval"/>
5381             <field name="grace_period" reporter:datatype="interval" />
5382                 </fields>
5383                 <links/>
5384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5385             <actions>
5386                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5387                 <retrieve/>
5388                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5389                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5390             </actions>
5391         </permacrud>
5392         </class>
5393         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5394                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5395                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5396                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5397                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5398                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5399                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5400                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5401                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5402                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5403                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5404                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5405                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5406                 </fields>
5407                 <links>
5408                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5409                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5410                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5411                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5412                 </links>
5413         </class>
5414         <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">
5415                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5416                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5417                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5418                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5419                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5420                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5421                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5422                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5423                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5424                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5425                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5426                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5427                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5428                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5429                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5430                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5431                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5432                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5433                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5434                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5435                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5436                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5437                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5438                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5439                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5440                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5441                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5442                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5443                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5444                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5445                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5446                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5447                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5448                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5449                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5451                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5452                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5453                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5454                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5455                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5456                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5457                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5459                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5460                 </fields>
5461                 <links>
5462                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5463                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5464                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5465                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5466                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5467                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5468                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5469                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5470                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5471                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5472                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5473                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5474                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5475                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5476                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5477                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5478                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5479                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5480                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5481                 </links>
5482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5483             <actions>
5484                 <create permission="CREATE_COPY">
5485                     <context link="call_number" field="owning_lib"/>
5486                 </create>
5487                 <retrieve/>
5488                 <update permission="UPDATE_COPY">
5489                     <context link="call_number" field="owning_lib"/>
5490                 </update>
5491                 <delete permission="DELETE_COPY">
5492                     <context link="call_number" field="owning_lib"/>
5493                 </delete>
5494             </actions>
5495         </permacrud>
5496         </class>
5497
5498         <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">
5499                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5500                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5501                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5502                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5503                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5504                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5505                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5506                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5507                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5508                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5509                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5510                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5511                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5512                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5513                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5514                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5515                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5516                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5517                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5518                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5519                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5520                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5521                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5522                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5523                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5524                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5525                 </fields>
5526                 <links>
5527                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5528                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5529                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5530                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5531                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5532                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5533                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5534                 </links>
5535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5536                         <actions>
5537                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5538                                 <retrieve />
5539                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5540                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5541                         </actions>
5542                 </permacrud>
5543         </class>
5544
5545         <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">
5546                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5547                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5548                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5549                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5550                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5551                 </fields>
5552                 <links/>
5553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5554             <actions>
5555                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5556                 <retrieve/>
5557                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5558                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5559             </actions>
5560         </permacrud>
5561         </class>
5562         <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">
5563                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5564                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5565                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5566                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5567                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5568                 </fields>
5569                 <links/>
5570         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5571             <actions>
5572                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5573                 <retrieve/>
5574                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5575                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5576             </actions>
5577         </permacrud>
5578         </class>
5579         <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">
5580                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5581                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5582                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5583                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5584                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5585                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5586                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5587                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5588                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5589                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5590                 </fields>
5591                 <links>
5592                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5593                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5594                 </links>
5595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5596             <actions>
5597                 <create permission="CREATE_PERM" global_required="true"/>
5598                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5599                 <update permission="UPDATE_PERM" global_required="true"/>
5600                 <delete permission="DELETE_PERM" global_required="true"/>
5601             </actions>
5602         </permacrud>
5603         </class>
5604         <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">
5605                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5606                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5607                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5608                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5609                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5610                 </fields>
5611                 <links>
5612                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5613                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5614                 </links>
5615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5616             <actions>
5617                 <create permission="ADMIN_SURVEY">
5618                     <context link="question" jump="survey" field="owner"/>
5619                 </create>
5620                 <retrieve/>
5621                 <update permission="ADMIN_SURVEY">
5622                     <context link="question" jump="survey" field="owner"/>
5623                 </update>
5624                 <delete permission="ADMIN_SURVEY">
5625                     <context link="question" jump="survey" field="owner"/>
5626                 </delete>
5627             </actions>
5628         </permacrud>
5629         </class>
5630         <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">
5631                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5632                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5633                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5634                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5635                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5636                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5637                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5638                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5639                 </fields>
5640                 <links>
5641                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5642                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5643                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5644                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5645                 </links>
5646         </class>
5647         <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">
5648                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5649                         <field name="balance_owed" reporter:datatype="money" />
5650                         <field name="total_owed" reporter:datatype="money" />
5651                         <field name="total_paid" reporter:datatype="money" />
5652                         <field name="usr" reporter:datatype="link"/>
5653                 </fields>
5654                 <links>
5655                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5656                 </links>
5657         </class>
5658         <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">
5659                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5660                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5661                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5662                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5663                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5664                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5665                 </fields>
5666                 <links>
5667                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5668                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5669                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5670                 </links>
5671         </class>
5672         <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">
5673                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5674                         <field name="field" reporter:datatype="link"/>
5675                         <field name="id" reporter:datatype="id" />
5676                         <field name="source" reporter:datatype="link"/>
5677                         <field name="value" reporter:datatype="text"/>
5678                 </fields>
5679                 <links>
5680                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5681                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5682                 </links>
5683         </class>
5684         <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">
5685                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5686                         <field name="field" reporter:datatype="link"/>
5687                         <field name="id" reporter:datatype="id" />
5688                         <field name="source" reporter:datatype="link"/>
5689                         <field name="value" reporter:datatype="text"/>
5690                 </fields>
5691                 <links>
5692                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5693                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5694                 </links>
5695         </class>
5696         <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">
5697                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5698                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5699                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5700                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5701                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5702                 </fields>
5703                 <links>
5704                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5705                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5706                 </links>
5707         </class>
5708         <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">
5709                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5710                         <field name="depth" reporter:datatype="int" />
5711                         <field name="grantable" reporter:datatype="bool"/>
5712                         <field name="grp" reporter:datatype="link"/>
5713                         <field name="id" reporter:datatype="id" />
5714                         <field name="perm" reporter:datatype="link"/>
5715                 </fields>
5716                 <links>
5717                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5718                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5719                 </links>
5720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5721             <actions>
5722                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5723                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5724                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5725                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5726             </actions>
5727         </permacrud>
5728         </class>
5729         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5730                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5731                         <field name="items" oils_persist:virtual="true" />
5732                         <field name="btype" reporter:datatype="text"/>
5733                         <field name="id" reporter:datatype="id" />
5734                         <field name="name" reporter:datatype="text"/>
5735                         <field name="description" reporter:datatype="text"/>
5736                         <field name="owner" reporter:datatype="link"/>
5737                         <field name="pub" reporter:datatype="bool"/>
5738                         <field name="create_time" reporter:datatype="timestamp" />
5739                 </fields>
5740                 <links>
5741                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5742                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5743                 </links>
5744         </class>
5745         <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">
5746                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5747                         <field name="id" reporter:datatype="id" />
5748                         <field name="bucket" reporter:datatype="link"/>
5749                         <field name="note" reporter:datatype="text" />
5750                 </fields>
5751                 <links>
5752                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5753                 </links>
5754         </class>
5755         <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">
5756                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5757                         <field name="id" reporter:datatype="int" />
5758                         <field name="usr" reporter:datatype="link"/>
5759                         <field name="work_ou" reporter:datatype="link"/>
5760                 </fields>
5761                 <links>
5762                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5763                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5764                 </links>
5765         </class>
5766         <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">
5767                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5768                         <field name="depth" reporter:datatype="int"/>
5769                         <field name="grantable" reporter:datatype="bool"/>
5770                         <field name="id" reporter:datatype="id" />
5771                         <field name="perm" reporter:datatype="link"/>
5772                         <field name="usr" reporter:datatype="link"/>
5773                 </fields>
5774                 <links>
5775                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5776                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5777                 </links>
5778         </class>
5779         <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">
5780                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5781                         <field name="object_id" reporter:datatype="text"/>
5782                         <field name="grantable" reporter:datatype="bool"/>
5783                         <field name="id" reporter:datatype="id" />
5784                         <field name="perm" reporter:datatype="link"/>
5785                         <field name="usr" reporter:datatype="link"/>
5786                         <field name="object_type" reporter:datatype="text"/>
5787                 </fields>
5788                 <links>
5789                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5790                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5791                 </links>
5792         </class>
5793         <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">
5794                 <fields oils_persist:primary="id" oils_persist:sequence="">
5795                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5796                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5797                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5798                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5799                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5800                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5801                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5802                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5803                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5804                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5805                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5806                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5807                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5808                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5809                 </fields>
5810                 <links>
5811                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5812                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5813                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5814                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5815                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5816                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5817                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5818                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5819                 </links>
5820         </class>
5821         <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">
5822                 <fields oils_persist:primary="id" oils_persist:sequence="">
5823                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5824                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5825                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5826                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5827                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5828                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5829                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5830                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5831                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5832                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5833                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5834                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5835                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5836                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5837                 </fields>
5838                 <links>
5839                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5840                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5841                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5842                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5843                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5844                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5845                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5846                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5847                 </links>
5848         </class>
5849         <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">
5850                 <fields oils_persist:primary="id" oils_persist:sequence="">
5851                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5852                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5853                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5854                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5855                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5856                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5857                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5858                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5859                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5860                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5861                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5862                 </fields>
5863                 <links>
5864                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5865                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5866                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5867                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5868                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5869                 </links>
5870         </class>
5871         <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">
5872                 <fields oils_persist:primary="id" oils_persist:sequence="">
5873                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5874                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5875                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5876                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5877                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5878                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5879                         <field reporter:label="Accepting User" name="accepting_usr" />
5880                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5881                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5882                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5883                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5884                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5885                 </fields>
5886                 <links>
5887                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5888                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5889                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5890                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5891                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5892                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5893                 </links>
5894         </class>
5895         <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">
5896                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5897                         <field name="bucket" reporter:datatype="link"/>
5898                         <field name="id" reporter:datatype="id" />
5899                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5900                         <field name="create_time" reporter:datatype="timestamp" />
5901                         <field name="pos" reporter:datatype="int" />
5902                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5903                 </fields>
5904                 <links>
5905                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5906                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5907             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5908                 </links>
5909         </class>
5910         <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">
5911                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5912                         <field name="id" reporter:datatype="id" />
5913                         <field name="item" reporter:datatype="link"/>
5914                         <field name="note" reporter:datatype="text" />
5915                 </fields>
5916                 <links>
5917                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5918                 </links>
5919         </class>
5920         <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">
5921                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5922                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5923                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5924                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5925                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5926                 </fields>
5927                 <links>
5928                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5929                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5930                 </links>
5931         </class>
5932     <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">
5933         <fields oils_persist:primary="field">
5934             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5935             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5936             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5937         </fields>
5938         <links/>
5939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5940             <actions>
5941                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5942                 <retrieve />
5943                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5944                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5945             </actions>
5946         </permacrud>
5947     </class>
5948         <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">
5949                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5950                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5951                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5952                 </fields>
5953                 <links/>
5954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5955             <actions>
5956                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5957                 <retrieve/>
5958                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5959                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5960             </actions>
5961         </permacrud>
5962         </class>
5963
5964
5965         <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">
5966                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5967                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5968                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5969                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5970                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5971                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5972                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5973                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5974                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5975                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5976                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5977                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5978                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5979                 </fields>
5980                 <links>
5981                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5982                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5983                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5984                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5985                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5986                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5987                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5988                 </links>
5989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5990             <actions>
5991                 <create permission="TRANSIT_COPY">
5992                     <context link="target_copy" field="owner"/>
5993                 </create>
5994                 <retrieve/>
5995                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5996                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5997             </actions>
5998         </permacrud>
5999         </class>
6000         <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">
6001                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6002                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6003                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6004                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6005                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6006                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6007                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6008                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6009                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6010                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6011                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6012                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6013                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6014                 </fields>
6015                 <links>
6016                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6017                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6018                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6019                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6020                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6021                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6022                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6023                 </links>
6024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6025             <actions>
6026                 <create permission="TRANSIT_COPY" context_field="owner">
6027                     <context link="target_copy" field="circ_lib"/>
6028                 </create>
6029                 <retrieve/>
6030                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6031                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6032             </actions>
6033         </permacrud>
6034         </class>
6035         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6036                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6037                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6038                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6039                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6040                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6041                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6042                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6043                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6044                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6045                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6046                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6047                 </fields>
6048                 <links>
6049                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6050                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6051                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6052                 </links>
6053         </class>
6054         <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">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6056                         <field name="grp" />
6057                         <field name="id" reporter:datatype="id" />
6058                         <field name="usr" />
6059                 </fields>
6060                 <links>
6061                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6062                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6063                 </links>
6064         </class>
6065         <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">
6066                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6067                         <field name="id" reporter:datatype="id" />
6068                         <field name="fq_field" reporter:datatype="text"/>
6069                         <field name="identity_value" reporter:datatype="text"/>
6070                         <field name="translation" reporter:datatype="text"/>
6071                         <field name="string" reporter:datatype="text"/>
6072                 </fields>
6073                 <links>
6074                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6075                 </links>
6076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6077             <actions>
6078                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6079                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6080                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6081                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6082             </actions>
6083         </permacrud>
6084         </class>
6085         <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">
6086                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6087                         <field name="id" reporter:datatype="id" />
6088                         <field name="fm_class" reporter:datatype="text"/>
6089                         <field name="field" reporter:datatype="text"/>
6090                         <field name="owner" reporter:datatype="org_unit"/>
6091                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6092                 </fields>
6093                 <links>
6094                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6095                 </links>
6096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6097             <actions>
6098                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6099                 <retrieve/>
6100                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6101                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6102             </actions>
6103         </permacrud>
6104         </class>
6105         <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">
6106                 <fields oils_persist:primary="code">
6107                         <field name="code" reporter:datatype="id" />
6108                         <field name="marc_code" reporter:datatype="text"/>
6109                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6110                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6111                 </fields>
6112                 <links/>
6113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6114             <actions>
6115                 <create permission="CREATE_LOCALE" global_required="true"/>
6116                 <retrieve/>
6117                 <update permission="UPDATE_LOCALE" global_required="true"/>
6118                 <delete permission="DELETE_LOCALE" global_required="true"/>
6119             </actions>
6120         </permacrud>
6121         </class>
6122         <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">
6123                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6124                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6125                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6126                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6127             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6128                 </fields>
6129                 <links>
6130                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6131                 </links>
6132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6133             <actions>
6134                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6135                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6136                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6137                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6138             </actions>
6139         </permacrud>
6140         </class>
6141
6142         <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">
6143                 <fields oils_persist:primary="id">
6144                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6145                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6146                 </fields>
6147                 <links/>
6148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6149             <actions>
6150                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6151                 <retrieve/>
6152                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6153                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6154             </actions>
6155         </permacrud>
6156         </class>
6157
6158         <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">
6159                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6160                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6161                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6162                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6163                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6164                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6165                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6166                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6167                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6168                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6169                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6170                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6171                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6172                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6173                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6174                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6175                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6176                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6177                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6178                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6179                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6180                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6181                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6182                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6183                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6184                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6185                 </fields>
6186                 <links>
6187                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6188                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6189                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6190                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6191                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6192                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6193                 </links>
6194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6195             <actions>
6196                 <create permission="user_request.create">
6197                     <context link="usr" field="home_ou"/>
6198                                 </create>
6199                 <retrieve permission="user_request.view">
6200                     <context link="usr" field="home_ou"/>
6201                                 </retrieve>
6202                 <update permission="user_request.update">
6203                     <context link="usr" field="home_ou"/>
6204                                 </update>
6205                 <delete permission="user_request.delete">
6206                     <context link="usr" field="home_ou"/>
6207                                 </delete>
6208             </actions>
6209         </permacrud>
6210         </class>
6211
6212         <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">
6213                 <fields oils_persist:primary="code">
6214                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6215                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6216                 </fields>
6217                 <links/>
6218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6219             <actions>
6220                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6221                 <retrieve/>
6222                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6223                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6224             </actions>
6225         </permacrud>
6226         </class>
6227
6228         <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">
6229                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6230                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6231                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6232                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6233                         <field reporter:label="Ratio" name="ratio" />
6234                 </fields>
6235                 <links>
6236                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6237                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6238                 </links>
6239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6240                         <actions>
6241                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6242                                 <retrieve/>
6243                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6244                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6245                         </actions>
6246                 </permacrud>
6247         </class>
6248
6249         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6250                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6251                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6252                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6253                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6254                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6255                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6256                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6257                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6258                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6259                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6260                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6261                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6262                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6263                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6264                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6265                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6266                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6267                 </fields>
6268                 <links>
6269                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6270                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6271             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6272             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6273             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6274                 </links>
6275         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6276             <actions>
6277                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6278                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6279                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6280                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6281             </actions>
6282         </permacrud>
6283         </class>
6284
6285         <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">
6286                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6287                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6288                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6289                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6290                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6291                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6292                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6293                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6294                 </fields>
6295                 <links>
6296                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6297                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6298                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6299                 </links>
6300         </class>
6301
6302         <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">
6303                 <fields oils_persist:primary="code">
6304                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6305                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6306                 </fields>
6307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6308             <actions>
6309                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6310                 <retrieve/>
6311                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6312                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6313             </actions>
6314                 </permacrud>
6315         </class>
6316
6317         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6319                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6320                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6321                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6322                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6323                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6324                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6325                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6326                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6327                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6328                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6329                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6330                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6331                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6332                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6333                 </fields>
6334                 <links>
6335                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6336                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6337                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6338                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6339                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6340                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6341                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6342                 </links>
6343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6344             <actions>
6345                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6346                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6347                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6348                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6349             </actions>
6350         </permacrud>
6351         </class>
6352
6353         <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">
6354                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6355                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6356                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6357                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6358                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6359                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6360                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6361                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6362                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6363                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6364                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6365                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6366                 </fields>
6367                 <links>
6368                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6369                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6370                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6371                 </links>
6372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6373             <actions>
6374                 <create   permission="ADMIN_INVOICE">
6375                                         <context link="invoice" field="receiver"/>
6376                                 </create>
6377                 <retrieve permission="ADMIN_INVOICE">
6378                                         <context link="invoice" field="receiver"/>
6379                                 </retrieve>
6380                 <update   permission="ADMIN_INVOICE">
6381                                         <context link="invoice" field="receiver"/>
6382                                 </update>
6383                                 <delete   permission="ADMIN_INVOICE">
6384                                         <context link="invoice" field="receiver"/>
6385                                 </delete>
6386             </actions>
6387         </permacrud>
6388         </class>
6389
6390         <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">
6391                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6393                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6394                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6395                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6396                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6397                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6398                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6399                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6400                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6401                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6402                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6403                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6404                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6405                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6406                 </fields>
6407                 <links>
6408                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6409                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6410                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6411                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6412                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6413                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6414                 </links>
6415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6416             <actions>
6417                 <create   permission="ADMIN_INVOICE">
6418                                         <context link="invoice" field="receiver"/>
6419                                 </create>
6420                 <retrieve permission="ADMIN_INVOICE">
6421                                         <context link="invoice" field="receiver"/>
6422                                 </retrieve>
6423                 <update   permission="ADMIN_INVOICE">
6424                                         <context link="invoice" field="receiver"/>
6425                                 </update>
6426                                 <delete   permission="ADMIN_INVOICE">
6427                                         <context link="invoice" field="receiver"/>
6428                                 </delete>
6429             </actions>
6430         </permacrud>
6431         </class>
6432
6433         <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">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6435                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6436                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6437                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6438                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6439                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6440                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6441                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6442                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6443                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6444                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6445                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6446                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6447                 </fields>
6448                 <links>
6449                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6450                 </links>
6451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6452             <actions>
6453                 <create permission="ADMIN_PROVIDER">
6454                     <context link="provider" field="owner"/>
6455                 </create>
6456                 <retrieve permission="ADMIN_PROVIDER">
6457                     <context link="provider" field="owner"/>
6458                 </retrieve>
6459                 <update permission="ADMIN_PROVIDER">
6460                     <context link="provider" field="owner"/>
6461                 </update>
6462                 <delete permission="ADMIN_PROVIDER">
6463                     <context link="provider" field="owner"/>
6464                 </delete>
6465             </actions>
6466         </permacrud>
6467         </class>
6468
6469         <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">
6470                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6471                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6472                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6473                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6474                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6475                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6476                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6477         </fields>
6478                 <links>
6479                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6480                 </links>
6481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6482             <actions>
6483                 <create permission="ADMIN_PROVIDER">
6484                     <context link="provider" field="owner"/>
6485                 </create>
6486                 <retrieve permission="ADMIN_PROVIDER">
6487                     <context link="provider" field="owner"/>
6488                 </retrieve>
6489                 <update permission="ADMIN_PROVIDER">
6490                     <context link="provider" field="owner"/>
6491                 </update>
6492                 <delete permission="ADMIN_PROVIDER">
6493                     <context link="provider" field="owner"/>
6494                 </delete>
6495             </actions>
6496         </permacrud>
6497     </class>
6498         <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">
6499                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6500                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6501                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6502                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6503                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6504                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6505                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6506                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6507                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6508                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6509                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6510                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6511                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6512                 </fields>
6513                 <links>
6514                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6515                 </links>
6516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6517             <actions>
6518                 <create permission="ADMIN_PROVIDER">
6519                     <context link="contact" jump='provider' field="owner"/>
6520                 </create>
6521                 <retrieve permission="ADMIN_PROVIDER">
6522                     <context link="contact" jump='provider' field="owner"/>
6523                 </retrieve>
6524                 <update permission="ADMIN_PROVIDER">
6525                     <context link="contact" jump='provider' field="owner"/>
6526                 </update>
6527                 <delete permission="ADMIN_PROVIDER">
6528                     <context link="contact" jump='provider' field="owner"/>
6529                 </delete>
6530             </actions>
6531         </permacrud>
6532         </class>
6533
6534         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6535                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6536                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6537                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6538                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6539                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6540                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6541                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6542                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6543                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6544                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6545                 </fields>
6546                 <links>
6547                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6548                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6549                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6550                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6551                 </links>
6552         </class>
6553
6554         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6556                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6557                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6558                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6559                 </fields>
6560                 <links>
6561             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6562                 </links>
6563                 <!--
6564                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6565                         But here's what it should look like if we ever do use pcrud.
6566                 -->
6567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6568                         <actions>
6569                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6570                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6571                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6572                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6573                         </actions>
6574                 </permacrud>
6575         </class>
6576
6577         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6579                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6580                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6581                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6582                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6583                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6584                 </fields>
6585                 <links>
6586                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6587                 </links>
6588                 <!--
6589                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6590                         But here's what it should look like if we ever do use pcrud.
6591                 -->
6592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6593                         <actions>
6594                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6595                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6596                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6597                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6598                         </actions>
6599                 </permacrud>
6600         </class>
6601
6602         <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">
6603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6604                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6605                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6606                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6607                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6608                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6609                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6610                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6611                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6612                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6613                 </fields>
6614                 <links>
6615                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6616                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6617             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6618             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6619                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6620                 </links>
6621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622             <actions>
6623                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6624                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6625                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6626                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6627             </actions>
6628         </permacrud>
6629         </class>
6630
6631         <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">
6632                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6633                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6634                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6635                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6636                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6637                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6638                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6639                 </fields>
6640                 <links>
6641                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6642                 </links>
6643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6644                         <actions>
6645                                 <create permission="ADMIN_FUNDING_SOURCE">
6646                     <context link="funding_source" field="owner"/>
6647                 </create>
6648                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6649                     <context link="funding_source" field="owner"/>
6650                 </retrieve>
6651                                 <update permission="ADMIN_FUNDING_SOURCE">
6652                     <context link="funding_source" field="owner"/>
6653                 </update>
6654                                 <delete permission="ADMIN_FUNDING_SOURCE">
6655                     <context link="funding_source" field="owner"/>
6656                 </delete>
6657                         </actions>
6658                 </permacrud>
6659         </class>
6660
6661         <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">
6662                 <fields oils_persist:primary="id">
6663                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6664                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6665                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6666                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6667                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6668                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6669                 </fields>
6670                 <links>
6671                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6672                 </links>
6673         </class>
6674
6675         <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">
6676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6677                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6678                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6679                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6680                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6681                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6682                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6683                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6684                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6685                 </fields>
6686                 <links>
6687                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6688                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6689                 </links>
6690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6691                         <actions>
6692                                 <create permission="ADMIN_ACQ_FUND">
6693                     <context link="fund" field="org"/>
6694                 </create>
6695                                 <retrieve permission="ADMIN_ACQ_FUND">
6696                     <context link="fund" field="org"/>
6697                 </retrieve>
6698                                 <update permission="ADMIN_ACQ_FUND">
6699                     <context link="fund" field="org"/>
6700                 </update>
6701                                 <delete permission="ADMIN_ACQ_FUND">
6702                     <context link="fund" field="org"/>
6703                 </delete>
6704                         </actions>
6705                 </permacrud>
6706         </class>
6707
6708         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6709                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6710                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6711                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6712                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6713                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6714                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6715                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6716                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6717                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6718                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6719                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6720                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6721                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6722                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6723                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6724                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6725                 </fields>
6726                 <links>
6727                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6728                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6729             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6730             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6731             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6732                 </links>
6733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6734             <actions>
6735                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6736                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6737                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6738                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6739             </actions>
6740         </permacrud>
6741         </class>
6742
6743         <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">
6744                 <fields oils_persist:primary="fund">
6745                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6746                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6747                 </fields>
6748                 <links>
6749                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6750                 </links>
6751         </class>
6752
6753         <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">
6754                 <fields oils_persist:primary="fund">
6755                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6756                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6757                 </fields>
6758                 <links>
6759                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6760                 </links>
6761         </class>
6762
6763         <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">
6764                 <fields oils_persist:primary="fund">
6765                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6766                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6767                 </fields>
6768                 <links>
6769                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6770                 </links>
6771         </class>
6772
6773         <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">
6774                 <fields oils_persist:primary="fund">
6775                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6776                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6777                 </fields>
6778                 <links>
6779                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6780                 </links>
6781         </class>
6782
6783         <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">
6784                 <fields oils_persist:primary="fund">
6785                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6786                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6787                 </fields>
6788                 <links>
6789                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6790                 </links>
6791         </class>
6792
6793    <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">
6794         <fields oils_persist:primary="fund">
6795             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6796             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6797         </fields>
6798         <links>
6799             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6800         </links>
6801     </class>
6802
6803    <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">
6804         <fields oils_persist:primary="fund">
6805             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6806             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6807         </fields>
6808         <links>
6809             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6810         </links>
6811     </class>
6812
6813    <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">
6814         <fields oils_persist:primary="fund">
6815             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6816             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6817         </fields>
6818         <links>
6819             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6820         </links>
6821     </class>
6822
6823    <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">
6824         <fields oils_persist:primary="fund">
6825             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6826             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6827         </fields>
6828         <links>
6829             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6830         </links>
6831     </class>
6832
6833    <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">
6834         <fields oils_persist:primary="fund">
6835             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6836             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6837         </fields>
6838         <links>
6839             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6840         </links>
6841     </class>
6842
6843         <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">
6844                 <fields oils_persist:primary="funding_source">
6845                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6846                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6847                 </fields>
6848                 <links>
6849                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6850                 </links>
6851         </class>
6852
6853         <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">
6854                 <fields oils_persist:primary="funding_source">
6855                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6856                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6857                 </fields>
6858                 <links>
6859                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6860                 </links>
6861         </class>
6862
6863         <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">
6864                 <fields oils_persist:primary="funding_source">
6865                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6866                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6867                 </fields>
6868                 <links>
6869                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6870                 </links>
6871         </class>
6872
6873         <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">
6874                 <fields oils_persist:primary="fund">
6875                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6876                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6877                 </fields>
6878                 <links>
6879                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6880                 </links>
6881         </class>
6882
6883         <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">
6884                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6885                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6886                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6887                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6888                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6889                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6890                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6891                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6892                 </fields>
6893                 <links>
6894                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6895                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6896                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6897                 </links>
6898                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6899                         <actions>
6900                                 <create permission="ADMIN_ACQ_FUND">
6901                     <context link="fund" field="org"/>
6902                 </create>
6903                                 <retrieve permission="ADMIN_ACQ_FUND">
6904                     <context link="fund" field="org"/>
6905                 </retrieve>
6906                                 <update permission="ADMIN_ACQ_FUND">
6907                     <context link="fund" field="org"/>
6908                 </update>
6909                                 <delete permission="ADMIN_ACQ_FUND">
6910                     <context link="fund" field="org"/>
6911                 </delete>
6912                         </actions>
6913                 </permacrud>
6914         </class>
6915
6916     <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">
6917         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6918             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6919             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6920             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6921             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6922             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6923             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6924             <field reporter:label="Note" name="note" reporter:datatype="text" />
6925             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6926         </fields>
6927         <links>
6928             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6929             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6930             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6931         </links>
6932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6933                         <actions>
6934                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6935                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6936                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6937                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6938                         </actions>
6939                 </permacrud>
6940     </class>
6941
6942         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6944                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6945                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6946                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6947                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6948                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6949                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6950                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6951                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6952                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6953                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6954                 </fields>
6955                 <links>
6956                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6957                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6958                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6959                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6960                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6961                 </links>
6962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6963                         <actions>
6964                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6965                         </actions>
6966                 </permacrud>
6967         </class>
6968
6969         <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">
6970                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6971                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6972                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6973                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6974                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6975                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6976                 </fields>
6977                 <links>
6978                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6979                 </links>
6980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6981                         <actions>
6982                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6983                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6984                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6985                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6986                         </actions>
6987                 </permacrud>
6988         </class>
6989
6990         <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">
6991                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6992                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6993                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6994                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6995                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6996                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6997                         <field reporter:label="State" name="state" reporter:datatype="text" />
6998                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6999                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7000                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7001                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7002                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7003                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7004                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7005                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7006                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7007                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7008                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7009                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7010                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7011                 </fields>
7012                 <links>
7013                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7014                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7015                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7016                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7017                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7018                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7019                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7020                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7021                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7022                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7023                 </links>
7024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7025                         <actions>
7026                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7027                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7028                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7029                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7030                         </actions>
7031                 </permacrud>
7032         </class>
7033
7034         <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">
7035                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7036                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7037                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7038                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7039                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7040                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7041                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7042                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7043                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7044                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7045                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7046                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7047                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7048                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7049                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7050                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7051                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7052                 </fields>
7053                 <links>
7054                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7055                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7056                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7057                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7058                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7059                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7060                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7061                 </links>
7062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7063             <actions>
7064                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7065             </actions>
7066                 </permacrud>
7067         </class>
7068
7069         <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">
7070                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7071                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7072                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7073                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7074                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7075                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7076                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7077                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7078                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7079                 </fields>
7080                 <links>
7081                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7082                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7083                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7084                 </links>
7085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7086             <actions>
7087                 <create permission="CREATE_PURCHASE_ORDER">
7088                     <context link="purchase_order" field="ordering_agency"/>
7089                 </create>
7090                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7091                     <context link="purchase_order" field="ordering_agency"/>
7092                 </retrieve>
7093                 <update permission="CREATE_PURCHASE_ORDER">
7094                     <context link="purchase_order" field="ordering_agency"/>
7095                 </update>
7096                 <delete permission="CREATE_PURCHASE_ORDER">
7097                     <context link="purchase_order" field="ordering_agency"/>
7098                 </delete>
7099             </actions>
7100                 </permacrud>
7101         </class>
7102
7103         <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">
7104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7105                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7106                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7107                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7108                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7109                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7110                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7111                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7112                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7113                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7114                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7115                 </fields>
7116                 <links>
7117                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7118                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7119                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7120                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7121                 </links>
7122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7123             <actions>
7124                 <create permission="CREATE_PURCHASE_ORDER">
7125                     <context link="purchase_order" field="ordering_agency"/>
7126                 </create>
7127                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7128                     <context link="purchase_order" field="ordering_agency"/>
7129                 </retrieve>
7130                 <update permission="CREATE_PURCHASE_ORDER">
7131                     <context link="purchase_order" field="ordering_agency"/>
7132                 </update>
7133                 <delete permission="CREATE_PURCHASE_ORDER">
7134                     <context link="purchase_order" field="ordering_agency"/>
7135                 </delete>
7136             </actions>
7137                 </permacrud>
7138         </class>
7139
7140         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7141                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7142                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7143                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7144                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7145                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7146                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7147                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7148                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7149                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7150                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7151                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7152                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7153                         <field reporter:label="State" name="state" reporter:datatype="text" />
7154                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7155                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7156                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7157                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7158                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7159                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7160                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7161                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7162                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7163                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7164                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7165                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7166                 </fields>
7167                 <links>
7168                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7169                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7170                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7171                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7172                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7173                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7174                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7175                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7176                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7177                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7178                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7179                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7180                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7181                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7182                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7183                 </links>
7184                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7185                         <actions>
7186                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7187                                         <context link="purchase_order" field="ordering_agency"/>
7188                                         <context link="picklist" field="org_unit"/>
7189                                 </retrieve>
7190                         </actions>
7191                 </permacrud>
7192         </class>
7193
7194         <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">
7195                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7196                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7197                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7198                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7199                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7200                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7201                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7202                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7203                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7204                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7205                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7206                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7207                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7208                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7209                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7210                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7211                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7212                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7213                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7214                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7215                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7216                 </fields>
7217                 <links>
7218                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7219                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7220                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7221                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7222                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7223                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7224                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7225                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7226                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7227                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7228                 </links>
7229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7230                         <actions>
7231                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7232                                         <context link="purchase_order" field="ordering_agency"/>
7233                                         <context link="picklist" field="org_unit"/>
7234                                 </retrieve>
7235                         </actions>
7236                 </permacrud>
7237         </class>
7238
7239         <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">
7240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7241                         <field reporter:label="Alert Text 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"/>
7244                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7245                 </fields>
7246                 <links>
7247                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7248                 </links>
7249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7250                         <actions>
7251                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7252                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7253                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7254                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7255                         </actions>
7256                 </permacrud>
7257         </class>
7258
7259         <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">
7260                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7261                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7262                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7263                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7264                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7265                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7266                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7267                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7268                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7269                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7270                 </fields>
7271                 <links>
7272                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7273                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7274                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7275                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7276                 </links>
7277         </class>
7278
7279         <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">
7280                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7281                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7282                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7283                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7284                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7285                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7286                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7287                 </fields>
7288                 <links>
7289                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7290                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7291                 </links>
7292         </class>
7293
7294         <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">
7295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7296                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7297                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7298                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7299                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7300                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7301                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7302                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7303                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7304                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7305                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7306                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7307                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7308                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7309                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7310                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7311                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7312                 </fields>
7313                 <links>
7314                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7315                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7316                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7317                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7318                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7319                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7320                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7321                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7322                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7323                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7324                 </links>
7325         </class>
7326
7327         <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">
7328                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7329                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7330                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7331                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7332                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7333                 </fields>
7334                 <links/>
7335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7336                         <actions>
7337                                 <retrieve />
7338                         </actions>
7339                 </permacrud>
7340         </class>
7341
7342         <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">
7343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7344                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7345                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7346                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7347                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7348                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7349             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7350                 </fields>
7351                 <links/>
7352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7353             <actions>
7354                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7355                 <retrieve />
7356                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7357                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7358             </actions>
7359         </permacrud>
7360         </class>
7361
7362         <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">
7363                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7364                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7365                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7366                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7367                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7368                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7369                 </fields>
7370                 <links/>
7371         </class>
7372         <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">
7373                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7374                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7375                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7376                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7377                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7378                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7379                 </fields>
7380                 <links>
7381                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7382                 </links>
7383         </class>
7384
7385         <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">
7386             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7387                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7388                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7389                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7390                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7391                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7392                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7393         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7394
7395             </fields>
7396             <links>
7397                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7398             </links>
7399             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7400                 <actions>
7401                     <create permission="ADMIN_PROVIDER">
7402                         <context link="provider" field="owner"/>
7403                     </create>
7404                     <retrieve permission="ADMIN_PROVIDER">
7405                         <context link="provider" field="owner"/>
7406                     </retrieve>
7407                     <update permission="ADMIN_PROVIDER">
7408                         <context link="provider" field="owner"/>
7409                     </update>
7410                     <delete permission="ADMIN_PROVIDER">
7411                         <context link="provider" field="owner"/>
7412                     </delete>
7413                 </actions>
7414             </permacrud>
7415         </class>
7416         
7417         <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">
7418             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7419                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7420                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7421                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7422                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7423             </fields>
7424             <links>
7425                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7426             </links>
7427             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7428                 <actions>
7429                     <create permission="ADMIN_PROVIDER">
7430                         <context link="provider" field="owner"/>
7431                     </create>
7432                     <retrieve permission="ADMIN_PROVIDER">
7433                         <context link="provider" field="owner"/>
7434                     </retrieve>
7435                     <update permission="ADMIN_PROVIDER">
7436                         <context link="provider" field="owner"/>
7437                     </update>
7438                     <delete permission="ADMIN_PROVIDER">
7439                         <context link="provider" field="owner"/>
7440                     </delete>
7441                 </actions>
7442             </permacrud>
7443         </class>
7444         
7445         <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">
7446             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7447                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7448                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7449                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7450                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7451                 </fields>
7452                 <links/>
7453         </class>
7454
7455         <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">
7456                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7457                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7458                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7459                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7460                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7461                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7462                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7463                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7464                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7465                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7466                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7467                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7468                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7469                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7470                 </fields>
7471                 <links>
7472                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7473                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7474                 </links>
7475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476             <actions>
7477                 <create permission="ADMIN_PROVIDER">
7478                     <context link="provider" field="owner"/>
7479                 </create>
7480                 <retrieve permission="ADMIN_PROVIDER">
7481                     <context link="provider" field="owner"/>
7482                 </retrieve>
7483                 <update permission="ADMIN_PROVIDER">
7484                     <context link="provider" field="owner"/>
7485                 </update>
7486                 <delete permission="ADMIN_PROVIDER">
7487                     <context link="provider" field="owner"/>
7488                 </delete>
7489             </actions>
7490         </permacrud>
7491         </class>
7492
7493         <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">
7494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7495                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7496                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7497                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7498                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7499                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7500                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7501                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7502                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7503                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7504                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7505                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7506                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7507                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7508                 </fields>
7509                 <links>
7510                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7511                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7512                 </links>
7513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7514             <actions>
7515                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7516                     <context link="account" jump="provider" field="owner"/>
7517                 </retrieve>
7518                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7519                     <context link="account" jump="provider" field="owner"/>
7520                 </update>
7521                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7522                     <context link="account" jump="provider" field="owner"/>
7523                 </delete>
7524             </actions>
7525         </permacrud>
7526         </class>
7527
7528
7529         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7530                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7531                         <field name="id" reporter:datatype="id" />
7532                         <field name="parent" reporter:datatype="link"/>
7533                         <field name="owner" reporter:datatype="link"/>
7534                         <field name="create_time" reporter:datatype="timestamp"/>
7535                         <field name="name" reporter:datatype="text"/>
7536                         <field name="shared" reporter:datatype="bool"/>
7537                         <field name="share_with" reporter:datatype="link"/>
7538                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7539                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7540                 </fields>
7541                 <links>
7542                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7543                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7544                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7545                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7546                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7547                 </links>
7548         </class>
7549         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7550                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7551                         <field name="id" reporter:datatype="id" />
7552                         <field name="parent" reporter:datatype="link"/>
7553                         <field name="owner" reporter:datatype="link"/>
7554                         <field name="create_time" reporter:datatype="timestamp"/>
7555                         <field name="name" reporter:datatype="text"/>
7556                         <field name="shared" reporter:datatype="bool"/>
7557                         <field name="share_with" reporter:datatype="link"/>
7558                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7559                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7560                 </fields>
7561                 <links>
7562                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7563                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7564                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7565                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7566                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7567                 </links>
7568         </class>
7569         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7570                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7571                         <field name="id" reporter:datatype="id" />
7572                         <field name="parent" reporter:datatype="link"/>
7573                         <field name="owner" reporter:datatype="link"/>
7574                         <field name="create_time" reporter:datatype="timestamp"/>
7575                         <field name="name" reporter:datatype="text"/>
7576                         <field name="shared" reporter:datatype="bool"/>
7577                         <field name="share_with" reporter:datatype="link"/>
7578                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7579                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7580                 </fields>
7581                 <links>
7582                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7583                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7584                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7585                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7586                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7587                 </links>
7588         </class>
7589         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7590                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7591                         <field name="id" reporter:datatype="id" />
7592                         <field name="owner" reporter:datatype="link"/>
7593                         <field name="create_time" reporter:datatype="timestamp"/>
7594                         <field name="name" reporter:datatype="text"/>
7595                         <field name="data" reporter:datatype="text"/>
7596                         <field name="folder" reporter:datatype="link"/>
7597                         <field name="description" reporter:datatype="text"/>
7598                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7599                 </fields>
7600                 <links>
7601                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7602                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7603                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7604                 </links>
7605         </class>
7606         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7607                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7608                         <field name="id" reporter:datatype="id" />
7609                         <field name="owner" reporter:datatype="link"/>
7610                         <field name="create_time" reporter:datatype="timestamp"/>
7611                         <field name="template" reporter:datatype="link"/>
7612                         <field name="data" reporter:datatype="text"/>
7613                         <field name="folder" reporter:datatype="link"/>
7614                         <field name="recur" reporter:datatype="bool"/>
7615                         <field name="recurrence" reporter:datatype="interval"/>
7616                         <field name="name" reporter:datatype="text"/>
7617                         <field name="description" reporter:datatype="text"/>
7618                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7619                 </fields>
7620                 <links>
7621                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7622                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7623                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7624                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7625                 </links>
7626         </class>
7627         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7628                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7629                         <field name="id" reporter:datatype="id" />
7630                         <field name="runner" reporter:datatype="link"/>
7631                         <field name="start_time" reporter:datatype="timestamp"/>
7632                         <field name="complete_time" reporter:datatype="timestamp"/>
7633                         <field name="run_time" reporter:datatype="timestamp"/>
7634                         <field name="email" reporter:datatype="text"/>
7635                         <field name="excel_format" reporter:datatype="bool"/>
7636                         <field name="csv_format" reporter:datatype="bool"/>
7637                         <field name="html_format" reporter:datatype="bool"/>
7638                         <field name="error_code" reporter:datatype="int"/>
7639                         <field name="error_text" reporter:datatype="text"/>
7640                         <field name="report" reporter:datatype="link"/>
7641                         <field name="folder" reporter:datatype="link"/>
7642                         <field name="chart_pie" reporter:datatype="bool"/>
7643                         <field name="chart_bar" reporter:datatype="bool"/>
7644                         <field name="chart_line" reporter:datatype="bool"/>
7645                 </fields>
7646                 <links>
7647                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7648                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7649                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7650                 </links>
7651         </class>
7652         <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">
7653                 <fields oils_persist:primary="id">
7654                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7655                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7656                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7657                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7658                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7659                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7660                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7661                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7662                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7663                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7664                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7665                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7666                 </fields>
7667                 <links>
7668                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7669                 </links>
7670         </class>
7671         <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">
7672                 <fields oils_persist:primary="id">
7673                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7674                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7675                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7676                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7677                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7678                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7679                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7680                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7681                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7682                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7683                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7684                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7685                 </fields>
7686                 <links>
7687                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7688                 </links>
7689         </class>
7690         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7691                 <fields oils_persist:primary="id">
7692                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7693                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7694                         <field reporter:label="Fingerprint" name="fingerprint" />
7695                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7696                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7697                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7698                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7699                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7700                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7701                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7702                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7703                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7704                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7705                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7706                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7707                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7708                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7709                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7710                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7711                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7712                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7713                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7714                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7715                 </fields>
7716                 <links>
7717                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7718                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7719                 </links>
7720         </class>
7721         <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">
7722                 <fields oils_persist:primary="id">
7723                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7724                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7725                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7726                 </fields>
7727                 <links>
7728                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7729                 </links>
7730         </class>
7731         <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">
7732                 <fields oils_persist:primary="id">
7733                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7734                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7735                 </fields>
7736                 <links>
7737                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7738                 </links>
7739         </class>
7740         <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">
7741                 <fields oils_persist:primary="id">
7742                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7743                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7744                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7745                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7746                 </fields>
7747                 <links>
7748                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7749                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7750                 </links>
7751         </class>
7752         <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">
7753                 <fields oils_persist:primary="xact">
7754                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7755                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7756                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7757                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7758                 </fields>
7759                 <links>
7760                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7761                 </links>
7762         </class>
7763         <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">
7764                 <fields oils_persist:primary="xact">
7765                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7766                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7767                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7768                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7769                 </fields>
7770                 <links>
7771                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7772                 </links>
7773         </class>
7774         <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)">
7775                 <fields oils_persist:primary="id">
7776                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7777                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7778                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7779                 </fields>
7780                 <links>
7781                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7782                 </links>
7783         </class>
7784         <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">
7785                 <fields oils_persist:primary="id">
7786                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7787                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7788                 </fields>
7789                 <links>
7790                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7791                 </links>
7792         </class>
7793         <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">
7794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7795                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7796                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7797                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7798                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7799                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7800                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7801                 </fields>
7802                 <links>
7803                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7804                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7805                 </links>
7806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7807                         <actions>
7808                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7809                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7810                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7811                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7812                         </actions>
7813                 </permacrud>
7814         </class>
7815         <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">
7816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7817                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7818                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7819                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7820                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7821                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7822                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7823                 </fields>
7824                 <links>
7825                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7826                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7827                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7828                 </links>
7829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7830                         <actions>
7831                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7832                                         <context link="formula" field="owner"/>
7833                                 </create>
7834                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7835                                         <context link="formula" field="owner"/>
7836                                 </retrieve>
7837                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7838                                         <context link="formula" field="owner"/>
7839                                 </update>
7840                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7841                                         <context link="formula" field="owner"/>
7842                                 </delete>
7843                         </actions>
7844                 </permacrud>
7845         </class>
7846
7847         <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">
7848                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7849                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7850                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7851                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7852                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7853                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7854                 </fields>
7855                 <links>
7856                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7857                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7858                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7859                 </links>
7860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7861                         <actions>
7862                                 <create permission="CREATE_PURCHASE_ORDER">
7863                                         <context link="formula" field="owner"/>
7864                 </create>
7865                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7866                                         <context link="formula" field="owner"/>
7867                 </retrieve>
7868                                 <update permission="CREATE_PURCHASE_ORDER">
7869                                         <context link="formula" field="owner"/>
7870                 </update>
7871                                 <delete permission="CREATE_PURCHASE_ORDER">
7872                                         <context link="formula" field="owner"/>
7873                 </delete>
7874                         </actions>
7875                 </permacrud>
7876         </class>
7877
7878         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7879                 <fields oils_persist:primary="id">
7880                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7881                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7882                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7883                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7884                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7885                 </fields>
7886                 <links>
7887                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7888                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7889                 </links>
7890         </class>
7891
7892         <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">
7893                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7894                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7895                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7896                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7897                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7898                 </fields>
7899                 <links>
7900                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7901                 </links>
7902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7903                         <actions>
7904                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7905                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7906                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7907                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7908                         </actions>
7909                 </permacrud>
7910         </class>
7911
7912         <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">
7913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7914                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7915                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7916                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7917                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7918                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7919                 </fields>
7920                 <links>
7921                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7922                 </links>
7923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7924                         <actions>
7925                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7926                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7927                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7928                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7929                         </actions>
7930                 </permacrud>
7931         </class>
7932
7933         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7934                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7935                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7936                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7937                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7938                 </fields>
7939                 <links>
7940                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7941                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7942                 </links>
7943         </class>
7944
7945         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7946                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7947                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7948                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7949                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7950                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7951                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7952                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7953                 </fields>
7954                 <links>
7955                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7956                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7957                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7958                 </links>
7959         </class>
7960
7961         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7962                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7963                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7964                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7965                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7966                 </fields>
7967                 <links>
7968                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7969                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7970                 </links>
7971         </class>
7972
7973         <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">
7974                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7975                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7976                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7977                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7978                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7979                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7980                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7981                 </fields>
7982                 <links>
7983                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7984                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7985                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7986                 </links>
7987         </class>
7988
7989         <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">
7990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7991                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7992                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7993                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7994                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7995                 </fields>
7996                 <links>
7997                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7998                 </links>
7999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8000             <actions>
8001                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8002                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8003                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8004                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8005             </actions>
8006                 </permacrud>
8007         </class>
8008
8009         <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">
8010                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8011                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8012                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8013                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8014                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8015                 </fields>
8016                 <links>
8017                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8018                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8019                 </links>
8020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8021                         <actions>
8022                                 <create permission="ADMIN_CLAIM_POLICY">
8023                                         <context link="claim_policy" field="org_unit"/>
8024                 </create>
8025                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8026                                         <context link="claim_policy" field="org_unit"/>
8027                 </retrieve>
8028                                 <update permission="ADMIN_CLAIM_POLICY">
8029                                         <context link="claim_policy" field="org_unit"/>
8030                 </update>
8031                                 <delete permission="ADMIN_CLAIM_POLICY">
8032                                         <context link="claim_policy" field="org_unit"/>
8033                 </delete>
8034                         </actions>
8035                 </permacrud>
8036         </class>
8037
8038     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8039         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8040             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8041             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8042             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8043             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8044             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8045             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8046             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8047             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8048             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8049             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8050             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8051             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8052             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8053             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8054             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8055         </fields>
8056     </class>
8057
8058     <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">
8059         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8060             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8061             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8062             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8063             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8064             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8065         </fields>
8066     </class>
8067
8068     <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">
8069         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8070             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8071             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8072             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8073             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8074             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8075             <field reporter:label="City" name="city" reporter:datatype="text"/>
8076             <field reporter:label="State" name="state" reporter:datatype="text"/>
8077             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8078             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8079             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8080         </fields>
8081     </class>
8082
8083     <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">
8084         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8085             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8086             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8087             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8088             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8089             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8090             <field reporter:label="City" name="city" reporter:datatype="text"/>
8091             <field reporter:label="State" name="state" reporter:datatype="text"/>
8092             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8093             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8094             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8095         </fields>
8096     </class>
8097
8098     <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">
8099         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8100             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8101             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8102             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8103             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8104             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8105             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8106         </fields>
8107     </class>
8108
8109         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8110                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8111                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8112                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8113                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8114                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8115                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8116                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8117                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8118                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8119                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8120                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8121                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8122                 </fields>
8123                 <links>
8124                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8125                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8126                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8127                 </links>
8128         </class>
8129
8130         <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">
8131                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8132                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8133                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8134                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8135                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8136                 </fields>
8137                 <links>
8138                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8139                 </links>
8140         </class>
8141
8142     <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">
8143         <fields>
8144             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8145             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8146             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8147         </fields>
8148                 <links>
8149                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8150                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8151                 </links>
8152     </class>
8153
8154     <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">
8155         <fields>
8156             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8157             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8158         </fields>
8159                 <links>
8160                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8161                 </links>
8162     </class>
8163
8164     <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">
8165         <fields>
8166             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8167             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8168             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8169         </fields>
8170                 <links>
8171                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8172                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8173                 </links>
8174     </class>
8175
8176     <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">
8177         <fields>
8178             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8179             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8180         </fields>
8181                 <links>
8182                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8183                 </links>
8184     </class>
8185
8186     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8187                 <oils_persist:source_definition>
8188
8189             SELECT  DISTINCT l.*
8190               FROM  action.unfulfilled_hold_loops l
8191                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8192               WHERE l.count = m.max
8193
8194                 </oils_persist:source_definition>
8195         <fields>
8196             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8197             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8198             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8199         </fields>
8200                 <links>
8201                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8202                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8203                 </links>
8204     </class>
8205
8206         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8207                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8208                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8209                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8210                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8211                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8212                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8213                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8214                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8215                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8216                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8217                 </fields>
8218                 <links>
8219                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8220                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8221                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8222                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8223                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8224                 </links>
8225         </class>
8226
8227         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8228                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8229                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8230                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8231                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8232                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8233                 </fields>
8234                 <links>
8235                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8236                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8237                 </links>
8238         </class>
8239
8240         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8241                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8242                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8243                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8244                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8245                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8246                 </fields>
8247                 <links>
8248                 </links>
8249         </class>
8250
8251         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8252                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8253                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8254                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8255                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8256                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8257                 </fields>
8258                 <links>
8259                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8260                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8261                 </links>
8262         </class>
8263         
8264         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8265                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8266                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8267                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8268                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8269                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8270                 </fields>
8271                 <links>
8272                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8273                 </links>
8274         </class>
8275         
8276         <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">
8277                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8278                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8279                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8280                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8281                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8282                 </fields>
8283                 <links>
8284                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8285                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8286                 </links>
8287         </class>
8288
8289         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8290                 <fields oils_persist:primary="name">
8291                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8292                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8293                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8294                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8295                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8296                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8297                 </fields>
8298                 <links>
8299                 </links>
8300         </class>
8301
8302         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8303                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8304                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8305                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8306                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8307                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8308                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8309                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8310                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8311                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8312                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8313                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8314                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8315                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8316                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8317                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8318                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8319                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8320                 </fields>
8321                 <links>
8322                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8323                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8324                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8325                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8326                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8327                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8328                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8329                 </links>
8330         </class>
8331
8332         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8333                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8334                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8335                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8336                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8337                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8338                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8339                 </fields>
8340                 <links>
8341                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8342                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8343                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8344                 </links>
8345         </class>
8346
8347         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8348                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8349                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8350                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8351                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8352                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8353                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8354                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8355                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8356                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8357                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8358                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8359                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8360                 </fields>
8361                 <links>
8362                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8363                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8364                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8365                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8366                 </links>
8367         </class>
8368
8369         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8370                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8371                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8372                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8373                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8374                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8375                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8376                 </fields>
8377                 <links>
8378                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8379                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8380                 </links>
8381         </class>
8382
8383         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8384                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8385                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8386                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8387                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8388                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8389                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8390                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8391                 </fields>
8392                 <links>
8393                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8394                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8395                 </links>
8396         </class>
8397
8398         <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">
8399                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8400                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8401                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8402                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8403                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8404                 </fields>
8405                 <links>
8406                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8407                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8408                 </links>
8409         </class>
8410
8411         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8412                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8413                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8414                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8415                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8416                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8417                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8418                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8419                 </fields>
8420                 <links>
8421                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8422                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8423                 </links>
8424         </class>
8425
8426         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8427                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8428                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8429                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8430                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8431                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8432                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8433                 </fields>
8434                 <links>
8435                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8436                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8437                 </links>
8438         </class>
8439
8440         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8441                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8442                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8443                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8444                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8445                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8446                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8447                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8448                 </fields>
8449                 <links>
8450                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8451                 </links>
8452         </class>
8453
8454         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8455                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8456                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8457                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8458                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8459                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8460                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8461                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8462                 </fields>
8463                 <links>
8464                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8465                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8466                 </links>
8467         </class>
8468
8469         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8470                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8471                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8472                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8473                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8474                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8475                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8476                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8477                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8478                 </fields>
8479                 <links>
8480                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8481                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8482                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8483                 </links>
8484         </class>
8485
8486         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8487                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8488                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8489                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8490                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8491                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8492                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8493                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8494                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8495                 </fields>
8496                 <links>
8497                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8498                 </links>
8499         </class>
8500
8501         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8502                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8503                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8504                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8505                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8506                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8507                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8508                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8509                 </fields>
8510                 <links>
8511                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8512                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8513                 </links>
8514         </class>
8515
8516         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8517                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8518                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8519                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8520                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8521                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8522                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8523                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8524                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8525                 </fields>
8526                 <links>
8527                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8528                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8529                 </links>
8530         </class>
8531
8532         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8533                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8534                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8535                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8536                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8537                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8538                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8539                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8540                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8541                 </fields>
8542                 <links>
8543                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8544                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8545                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8546                 </links>
8547         </class>
8548
8549         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8550                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8551                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8552                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8553                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8554                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8555                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8556                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8557                 </fields>
8558                 <links>
8559                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8560                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8561                 </links>
8562         </class>
8563
8564         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8565                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8566                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8567                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8568                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8569                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8570                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8571                 </fields>
8572                 <links>
8573                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8574                 </links>
8575         </class>
8576
8577         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8578                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8579                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8580                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8581                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8582                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8583                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8584                 </fields>
8585                 <links>
8586                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8587                 </links>
8588         </class>
8589
8590         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8591                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8592                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8593                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8594                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8595                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8596                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8597                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8598                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8599                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8600                 </fields>
8601                 <links>
8602                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8603                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8604                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8605                 </links>
8606         </class>
8607
8608         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8609                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8610                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8611                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8612                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8613                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8614                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8615                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8616                 </fields>
8617                 <links>
8618                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8619                 </links>
8620         </class>
8621
8622         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8623                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8624                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8625                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8626                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8627                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8628                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8629                 </fields>
8630                 <links>
8631                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8632                 </links>
8633         </class>
8634
8635         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8636                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8637                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8638                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8639                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8640                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8641                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8642                 </fields>
8643                 <links>
8644                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8645                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8646                 </links>
8647         </class>
8648
8649         <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">
8650                 <fields oils_persist:primary="id">
8651                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8652                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8653                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8654                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8655                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8656                 </fields>
8657                 <links>
8658                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8659                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8660                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8661                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8662                 </links>
8663         </class>
8664
8665         <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">
8666                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8667                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8668                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8669                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8670                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8671                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8672                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8673                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8674                 </fields>
8675                 <links/>
8676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8677                         <actions>
8678                                 <retrieve/>
8679                         </actions>
8680                 </permacrud>
8681         </class>
8682
8683         <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">
8684                 <fields oils_persist:primary="ptype_key">
8685                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8686                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8687                 </fields>
8688                 <links/>
8689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8690                         <actions>
8691                                 <retrieve/>
8692                         </actions>
8693                 </permacrud>
8694         </class>
8695
8696         <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">
8697                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8698                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8699                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8700                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8701                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8702                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8703                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8704                 </fields>
8705                 <links>
8706                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8707                 </links>
8708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8709                         <actions>
8710                                 <retrieve/>
8711                         </actions>
8712                 </permacrud>
8713         </class>
8714
8715         <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">
8716                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8717                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8718                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8719                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8720                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8721                 </fields>
8722                 <links>
8723                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8724                 </links>
8725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8726                         <actions>
8727                                 <retrieve/>
8728                         </actions>
8729                 </permacrud>
8730         </class>
8731
8732         <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">
8733                 <fields oils_persist:primary="code">
8734                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8735                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8736                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8737                 </fields>
8738                 <links/>
8739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8740                         <actions>
8741                                 <retrieve/>
8742                         </actions>
8743                 </permacrud>
8744         </class>
8745
8746         <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">
8747                 <oils_persist:source_definition>
8748
8749             SELECT  b.id,
8750                     MAX(dcp.edit_date) AS last_delete_date
8751              FROM   biblio.record_entry b
8752                     JOIN asset.call_number cn ON (cn.record = b.id)
8753                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8754              WHERE  NOT b.deleted
8755              GROUP BY b.id
8756              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8757
8758                 </oils_persist:source_definition>
8759                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8760                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8761                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8762                 </fields>
8763                 <links>
8764                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8765                 </links>
8766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8767                         <actions>
8768                                 <retrieve/>
8769                         </actions>
8770                 </permacrud>
8771         </class>
8772
8773         <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">
8774                 <oils_persist:source_definition>
8775
8776             -- -- 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.
8777             -- -- 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
8778             -- -- may not.
8779             -- SELECT
8780             --     bre.id AS "bib_id",
8781             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8782             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8783             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8784             -- FROM (
8785                 SELECT
8786                     y.bre AS "id",
8787                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8788                     y.hold_count AS "hold_count",
8789                     (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"
8790                 FROM (
8791                         SELECT
8792                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8793                             COUNT(*) AS "hold_count"
8794                         FROM action.hold_request h
8795                         WHERE
8796                             cancel_time IS NULL
8797                             AND fulfillment_time IS NULL
8798                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8799                         GROUP BY 1
8800                     )y LEFT JOIN (
8801                         SELECT 
8802                             (SELECT id
8803                                 FROM biblio.record_entry 
8804                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8805                             ) AS "bre", 
8806                             COUNT(*) AS "copy_count"
8807                         FROM asset.copy
8808                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8809                         WHERE copy.holdable 
8810                             AND NOT copy.deleted 
8811                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8812                         GROUP BY 1
8813                     )x ON x.bre = y.bre
8814                 -- )z RIGHT JOIN (
8815                 --     SELECT id
8816                 --     FROM biblio.record_entry
8817                 --     WHERE NOT deleted
8818                 -- )bre ON (z.bib_id = bre.id)
8819                 
8820
8821                 </oils_persist:source_definition>
8822                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8823                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8824                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8825                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8826                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8827                 </fields>
8828                 <links>
8829                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8830                 </links>
8831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8832                         <actions>
8833                                 <retrieve/>
8834                         </actions>
8835                 </permacrud>
8836         </class>
8837
8838         <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">
8839                 <oils_persist:source_definition>
8840             SELECT *,
8841                 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,
8842                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
8843             FROM
8844                 (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
8845                     FROM
8846                         action.hold_request ahr
8847                         JOIN reporter.hold_request_record rhrr USING (id)
8848                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8849                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
8850                     WHERE
8851                         ahr.cancel_time IS NULL
8852                         AND ahr.fulfillment_time IS NULL
8853                     GROUP BY bib_record, pickup_lib
8854                 )x
8855                 JOIN
8856                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
8857                     FROM
8858                         action.hold_request ahr
8859                         JOIN reporter.hold_request_record rhrr USING (id)
8860                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8861                     WHERE
8862                         ahr.cancel_time IS NULL
8863                         AND ahr.fulfillment_time IS NULL
8864                     GROUP BY bib_record
8865                 )y
8866                 USING (id)
8867                 </oils_persist:source_definition>
8868                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8869                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
8870                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
8871                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
8872                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
8873                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
8874                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
8875                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
8876                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
8877                 </fields>
8878                 <links>
8879                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8880                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8881                 </links>
8882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8883                         <actions>
8884                                 <retrieve/>
8885                         </actions>
8886                 </permacrud>
8887         </class>
8888
8889         <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">
8890                 <oils_persist:source_definition>
8891             SELECT
8892                 ac.id,
8893                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
8894                 MAX(actac.xact_start) AS last_circ
8895             FROM asset.copy ac
8896                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8897             GROUP BY ac.id
8898
8899             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
8900             --SELECT
8901             --    ac.id,
8902             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
8903             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
8904             --FROM asset.copy ac
8905             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8906             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
8907             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
8908                 </oils_persist:source_definition>
8909                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8910                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
8911                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
8912                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
8913                 </fields>
8914                 <links>
8915                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8916                 </links>
8917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8918                         <actions>
8919                                 <retrieve/>
8920                         </actions>
8921                 </permacrud>
8922         </class>
8923
8924         <!-- ********************************************************************************************************************* -->
8925         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8926         <!-- ********************************************************************************************************************* -->
8927         <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">
8928                 <fields oils_persist:primary="id">
8929                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8930                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8931                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8932                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8933                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8934                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8935                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8936                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8937                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8938                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8939                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8940                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8941                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8942                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8943                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8944                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8945                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8946                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8947                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8948                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8949                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8950                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8951                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8952                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8953                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8954                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8955                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8956                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8957                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8958                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8959                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8960                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8961                 </fields>
8962                 <links>
8963                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8964                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8965                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8966                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8967                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8968                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8969                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8970                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8971                 </links>
8972         </class>
8973
8974         <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">
8975                 <fields oils_persist:primary="id">
8976                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8977                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8978                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8979                 </fields>
8980                 <links>
8981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8982                 </links>
8983         </class>
8984
8985         <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">
8986                 <fields oils_persist:primary="id">
8987                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8988                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8989                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8990                 </fields>
8991                 <links>
8992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8993                 </links>
8994         </class>
8995
8996         <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">
8997                 <fields oils_persist:primary="id">
8998                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8999
9000                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9001                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9002                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9003
9004                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9005                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9006                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9007
9008                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9009                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9010
9011                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9012                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9013                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9014
9015                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9016                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9017
9018                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9019                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9020                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9021
9022                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9023                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9024                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9025
9026                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9027                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9028                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9029                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9030
9031                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9032                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9033
9034                 </fields>
9035                 <links>
9036                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9037                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9038                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9039                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9040                 </links>
9041         </class>
9042
9043         <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">
9044                 <oils_persist:source_definition>
9045
9046             SELECT
9047                 po.ordering_agency AS ordering_agency,
9048                 po.id AS purchase_order,
9049                 li.id AS lineitem,
9050                 lid.id AS lineitem_detail,
9051                 cpa.id AS claim_policy_action
9052             FROM
9053                 acq.lineitem_detail lid
9054                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9055                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9056                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9057                 JOIN acq.claim_policy_action cpa ON (
9058                     cpa.claim_policy = cp.id
9059
9060                     -- we only care about claim policy actions whose claim
9061                     -- interval we'd reached or exceeded
9062                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9063
9064                     -- filter out all claim policy actions where claim events
9065                     -- have occurred on or after the action's action_interval
9066                     AND NOT EXISTS (
9067                         SELECT 1
9068                         FROM
9069                             acq.claim_event evt
9070                             JOIN acq.claim claim ON (
9071                                 claim.id = evt.claim
9072                                 AND claim.lineitem_detail = lid.id
9073                             )
9074                         WHERE
9075                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9076                     )
9077                 )
9078             WHERE
9079                 lid.cancel_reason IS NULL
9080                 AND li.cancel_reason IS NULL -- belt/suspenders
9081                 AND po.cancel_reason IS NULL -- belt/suspenders
9082                 AND lid.recv_time IS NULL
9083                 AND po.state = 'on-order'
9084             ORDER BY 1, 2, 3, 4, 5
9085
9086                 </oils_persist:source_definition>
9087                 <fields>
9088                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9089                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9090                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9091                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9092                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9093                 </fields>
9094                 <links>
9095                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9096                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9097                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9098                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9099                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9100                 </links>
9101         </class>
9102
9103         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9104                 <oils_persist:source_definition>
9105
9106             SELECT 
9107                 li.id AS lineitem, 
9108                 (
9109                     SELECT COUNT(lid.id) 
9110                     FROM acq.lineitem_detail lid
9111                     WHERE lineitem = li.id
9112                 ) AS item_count,
9113                 (
9114                     SELECT COUNT(lid.id) 
9115                     FROM acq.lineitem_detail lid
9116                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9117                 ) AS recv_count,
9118                 (
9119                     SELECT COUNT(lid.id) 
9120                     FROM acq.lineitem_detail lid
9121                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9122                 ) AS cancel_count,
9123                 (
9124                     SELECT COUNT(lid.id) 
9125                     FROM acq.lineitem_detail lid
9126                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9127                     WHERE NOT debit.encumbrance AND lineitem = li.id
9128                 ) AS invoice_count,
9129                 (
9130                     SELECT COUNT(DISTINCT(lid.id)) 
9131                     FROM acq.lineitem_detail lid
9132                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9133                     WHERE lineitem = li.id
9134                 ) AS claim_count,
9135                 (
9136                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9137                     FROM acq.lineitem_detail lid
9138                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9139                 ) AS estimated_amount,
9140                 (
9141                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9142                     FROM acq.lineitem_detail lid
9143                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9144                     WHERE debit.encumbrance AND lineitem = li.id
9145                 ) AS encumbrance_amount,
9146                 (
9147                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9148                     FROM acq.lineitem_detail lid
9149                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9150                     WHERE NOT debit.encumbrance AND lineitem = li.id
9151                 ) AS paid_amount
9152
9153                 FROM acq.lineitem AS li
9154         </oils_persist:source_definition>
9155                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9156                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9157                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9158                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9159                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9160                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9161                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9162                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9163                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9164                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9165                 </fields>
9166                 <links>
9167                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9168                 </links>
9169     </class>
9170
9171
9172         <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">
9173                 <oils_persist:source_definition>
9174
9175                         SELECT  t.*
9176                           FROM  action.transit_copy t
9177                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9178                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9179                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9180
9181                 </oils_persist:source_definition>
9182                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9183                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9184                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9185                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9186                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9187                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9188                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9189                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9190                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9191                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9192                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9193                 </fields>
9194                 <links>
9195                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9196                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9197                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9198                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9199                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9200                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9201                 </links>
9202         </class>
9203
9204     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9205                 <oils_persist:source_definition>
9206
9207         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9208                 SELECT
9209                         cp.id as copy,
9210                         COUNT(circ.id),
9211                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9212                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9213                 FROM
9214                         asset.copy cp
9215                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9216                 GROUP BY 1, 3, 4
9217                 UNION
9218                 SELECT
9219                         cp.id as copy,
9220                         COUNT(circ.id),
9221                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9222                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9223                 FROM
9224                         asset.copy cp
9225                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9226                 GROUP BY 1, 3, 4
9227                 UNION
9228                 SELECT
9229                         id as copy,
9230                         circ_count,
9231                         -1 AS year,
9232                         false as is_renewal
9233                 FROM
9234                         extend_reporter.legacy_circ_count
9235         )x GROUP BY 1, 3, 4
9236
9237                 </oils_persist:source_definition>
9238         <fields>
9239             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9240             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9241             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9242             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9243         </fields>
9244                 <links>
9245                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9246                 </links>
9247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9248                         <actions>
9249                                 <retrieve/>
9250                         </actions>
9251                 </permacrud>
9252     </class>
9253
9254         <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">
9255                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9256                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9257                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9258                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9259                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9260                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9261                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9262                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9263                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9264                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9265                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9266                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9267                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9268                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9269                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9270                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9271                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9272                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9273                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9274                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9275                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9276                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9277                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9278                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9279                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9280                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9281                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9282                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9283                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9284                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9285                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9286                 </fields>
9287                 <links>
9288                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9289                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9290                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9291                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9292                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9293                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9294                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9295                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9296                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9297                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9298                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9299                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9300                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9301                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9302                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9303                 </links>
9304         </class>
9305
9306     <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">
9307         <fields oils_persist:primary="id">
9308             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9309             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9310             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9311             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9312             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9313             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9314             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9315             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9316             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9317             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9318             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9319             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9320             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9321             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9322             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9323             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9324             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9325             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9326             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9327             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9328             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9329             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9330             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9331             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9332             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9333             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9334             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9335             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9336             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9337             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9338             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9339             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9340             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9341             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9342         </fields>
9343         <links>
9344             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9345             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9346             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9347             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9348             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9349         </links>
9350     </class>
9351
9352     <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">
9353         <fields oils_persist:primary="id">
9354             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9355             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9356             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9357             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9358         </fields>
9359         <links>
9360             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9361             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9362         </links>
9363     </class>
9364
9365     <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">
9366         <fields oils_persist:primary="owning_lib">
9367             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9368             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9369             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9370         </fields>
9371         <links>
9372             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9373         </links>
9374     </class>
9375
9376     <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">
9377         <fields oils_persist:primary="id">
9378             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9379             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9380             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9381             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9382             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9383         </fields>
9384         <links>
9385             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9386             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9387             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9388         </links>
9389     </class>
9390
9391     <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">
9392         <fields oils_persist:primary="circ_lib">
9393             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9394             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9395             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9396             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9397         </fields>
9398         <links>
9399             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9400             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9401         </links>
9402     </class>
9403
9404     <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">
9405         <fields oils_persist:primary="id">
9406             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9407             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9408             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9409             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9410             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9411         </fields>
9412         <links>
9413             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9414             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9415             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9416         </links>
9417     </class>
9418
9419     <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">
9420         <fields oils_persist:primary="home_ou">
9421             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9422             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9423             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9424             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9425         </fields>
9426         <links>
9427             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9428             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9429         </links>
9430     </class>
9431         <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">
9432                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9433                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9434                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9435                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9436                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9437                 </fields>
9438                 <links>
9439                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9440                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9441                 </links>
9442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9443                         <actions>
9444                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9445                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9446                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9447                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9448                         </actions>
9449                 </permacrud>
9450         </class>
9451         <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">
9452                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9453                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9454                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9455                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9456                 </fields>
9457                 <links>
9458                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9459                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9460                         </links>
9461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9462                 <actions>
9463                                 <create permission="ADMIN_ACQ_FUND_TAG">
9464                                         <context link="tag" field="owner"/>
9465                                 </create>
9466                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9467                                         <context link="tag" field="owner"/>
9468                                 </retrieve>
9469                                 <update permission="ADMIN_ACQ_FUND_TAG">
9470                                         <context link="tag" field="owner"/>
9471                                 </update>
9472                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9473                                         <context link="tag" field="owner"/>
9474                                 </delete>
9475                         </actions>
9476                 </permacrud>
9477         </class>
9478         <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">
9479                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9480                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9481                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9482                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9483                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9484                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9485                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9486                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9487                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9488                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9489                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9490                 </fields>
9491                 <links>
9492                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9493                 </links>
9494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9495                         <actions>
9496                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9497                                 <retrieve/>
9498                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9499                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9500                         </actions>
9501                 </permacrud>
9502         </class>
9503
9504         <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">
9505                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9506                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9507                         <field name="date_applied" reporter:datatype="timestamp"/>
9508                         <field name="org" reporter:datatype="org_unit"/>
9509                         <field name="original_value" reporter:datatype="text"/>
9510                         <field name="new_value" reporter:datatype="text"/>
9511                         <field name="field_name" reporter:datatype="link"/>
9512                 </fields>
9513                 <links>
9514                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9515                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9516                 </links>
9517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9518                         <actions>
9519                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9520                                 <retrieve/>
9521                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9522                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9523                         </actions>
9524                 </permacrud>
9525         </class>
9526         <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">
9527                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9528                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9529                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9530                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9531                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9532                 </fields>
9533                 <links>
9534                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9535                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9536                 </links>
9537         </class>
9538         <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">
9539                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9540                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9541                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9542                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9543                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9544                 </fields>
9545                 <links>
9546                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9547                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9548                 </links>
9549         </class>
9550
9551
9552         <!-- ********************************************************************************************************************* -->
9553
9554 </IDL>
9555
9556 <!--
9557     vim:noet:ts=4:sw=4:
9558 -->