]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
User activity tracking : user usr_activity field
[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
3932     <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">
3933         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3934             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3935             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3936             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3937             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3938         </fields>
3939         <links>
3940             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3941             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3942         </links>
3943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3944             <actions>
3945                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3946                 <retrieve/>
3947                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3948                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3949             </actions>
3950         </permacrud>
3951     </class>
3952
3953         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3954                 <fields>
3955                         <field name="sre_id" oils_persist:virtual="true" />
3956                         <field name="location" oils_persist:virtual="true" />
3957                         <field name="owning_lib" oils_persist:virtual="true" />
3958                         <field name="basic_holdings" oils_persist:virtual="true" />
3959                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3960                         <field name="supplement_holdings" oils_persist:virtual="true" />
3961                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3962                         <field name="index_holdings" oils_persist:virtual="true" />
3963                         <field name="index_holdings_add" oils_persist:virtual="true" />
3964                         <field name="online" oils_persist:virtual="true" />
3965                         <field name="missing" oils_persist:virtual="true" />
3966                         <field name="incomplete" oils_persist:virtual="true" />
3967                 </fields>
3968         </class>
3969
3970         <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">
3971                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3972                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3973                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3974                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3975                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3976                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3977                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3978                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3979                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3980                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3981                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3982                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3983                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3984                 </fields>
3985                 <links>
3986                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3987                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3988                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3989                         <link field="owning_lib" 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="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3994                                 <retrieve/>
3995                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3996                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3997                         </actions>
3998                 </permacrud>
3999         </class>
4000
4001         <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">
4002                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4003                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4004                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4005                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4006                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4007                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4008                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4009                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4010                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4011                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4012                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4013                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4014                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4015                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4016                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4017                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4018                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4019                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4020                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4021                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4022                 </fields>
4023                 <links>
4024                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4025                 </links>
4026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4027                         <actions>
4028                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4029                                         <context link="subscription" field="owning_lib" />
4030                                 </create>
4031                                 <retrieve />
4032                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4033                                         <context link="subscription" field="owning_lib" />
4034                                 </update>
4035                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4036                                         <context link="subscription" field="owning_lib" />
4037                                 </delete>
4038                         </actions>
4039                 </permacrud>
4040         </class>
4041
4042         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4043                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4044                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4045                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4046                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4047                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4048                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4049                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4050                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4051                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4052                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4053                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4054                 </fields>
4055                 <links>
4056                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4057                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4058                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4059                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4060                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4061                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4062                 </links>
4063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4064                         <actions>
4065                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4066                                 <retrieve />
4067                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4068                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4069                         </actions>
4070                 </permacrud>
4071         </class>
4072
4073         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4074                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4075                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4076                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4077                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4078                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4080                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4081                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4082                 </fields>
4083                 <links>
4084                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4086                 </links>
4087         </class>
4088
4089         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4090                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4091                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4092                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4093                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4094                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4095                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4096                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4097                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4098                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4099                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4100                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4101                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4102                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4103                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4104                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4105                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4106                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4107                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4108                 </fields>
4109                 <links>
4110                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4111                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4112                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4113                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4114                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4115                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4116                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4117                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4118                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4119                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4120                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4121                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4122                 </links>
4123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4124                         <actions>
4125                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4126                                 <retrieve />
4127                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4128                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4129                         </actions>
4130                 </permacrud>
4131         </class>
4132
4133         <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">
4134                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4136                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4137                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4138                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4139                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4140                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4141                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4142                 </fields>
4143                 <links>
4144                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4145                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4146                 </links>
4147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4148                         <actions>
4149                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4150                                         <context link="distribution" field="holding_lib" />
4151                                 </create>
4152                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4153                                         <context link="distribution" field="holding_lib" />
4154                                 </retrieve>
4155                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4156                                         <context link="distribution" field="holding_lib" />
4157                                 </update>
4158                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4159                                         <context link="distribution" field="holding_lib" />
4160                                 </delete>
4161                         </actions>
4162                 </permacrud>
4163         </class>
4164
4165         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4166                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4167                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4168                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4169                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4170                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4171                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4172                 </fields>
4173                 <links>
4174                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4175                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4176                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4177                 </links>
4178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4179                         <actions>
4180                                 <create permission="ADMIN_SERIAL_STREAM">
4181                                         <context link="distribution" field="holding_lib" />
4182                                 </create>
4183                                 <retrieve />
4184                                 <update permission="ADMIN_SERIAL_STREAM">
4185                                         <context link="distribution" field="holding_lib" />
4186                                 </update>
4187                                 <delete permission="ADMIN_SERIAL_STREAM">
4188                                         <context link="distribution" field="holding_lib" />
4189                                 </delete>
4190                         </actions>
4191                 </permacrud>
4192         </class>
4193
4194         <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">
4195                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4196                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4197                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4198                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4199                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4200                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4201                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4202                 </fields>
4203                 <links>
4204                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4205                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4206                 </links>
4207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4208                         <actions>
4209                                 <create permission="ADMIN_SERIAL_STREAM">
4210                                         <context link="stream" jump="distribution" field="holding_lib" />
4211                                 </create>
4212                                 <retrieve permission="RECEIVE_SERIAL">
4213                                         <context link="stream" jump="distribution" field="holding_lib" />
4214                                 </retrieve>
4215                                 <update permission="ADMIN_SERIAL_STREAM">
4216                                         <context link="stream" jump="distribution" field="holding_lib" />
4217                                 </update>
4218                                 <delete permission="ADMIN_SERIAL_STREAM">
4219                                         <context link="stream" jump="distribution" field="holding_lib" />
4220                                 </delete>
4221                         </actions>
4222                 </permacrud>
4223         </class>
4224
4225         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4226                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4227                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4228                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4229                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4230                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4231                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4232                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4233                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4234                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4235                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4236                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4237                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4238                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4239                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4240                 </fields>
4241                 <links>
4242                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4243                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4244                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4245                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4246                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4247                 </links>
4248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4249                         <actions>
4250                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4251                                         <context link="subscription" field="owning_lib" />
4252                                 </create>
4253                                 <retrieve/>
4254                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4255                                         <context link="subscription" field="owning_lib" />
4256                                 </update>
4257                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4258                                         <context link="subscription" field="owning_lib" />
4259                                 </delete>
4260                         </actions>
4261                 </permacrud>
4262         </class>
4263
4264         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4266                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4267                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4268                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4269                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4270                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4271                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4272                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4273                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4274                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4275                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4276                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4277                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4278                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4279                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4280                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4281                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4282                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4283                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4284                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4285                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4286                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4287                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4288                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4289                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4290                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4291                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4292                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4293                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4294                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4295                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4296                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4297                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4298                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4299                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4300                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4301                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4302                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4303                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4304                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4305                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4306                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4307                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4308                 </fields>
4309                 <links>
4310                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4311                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4312                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4313                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4314                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4315                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4316                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4317                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4318                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4319                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4320                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4321                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4322                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4323                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4324                 </links>
4325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4326                         <actions>
4327                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4328                                 <retrieve/>
4329                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4330                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4331                         </actions>
4332                 </permacrud>
4333         </class>
4334
4335         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4336                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4337                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4338                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4339                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4340                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4341                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4342                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4343                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4344                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4345                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4346                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4347                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4348                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4349                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4350                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4351                 </fields>
4352                 <links>
4353                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4354                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4355                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4356                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4357                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4358                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4359                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4360                 </links>
4361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4362                         <actions>
4363                                 <create permission="ADMIN_SERIAL_ITEM">
4364                                         <context link="stream" jump="distribution" field="holding_lib" />
4365                                 </create>
4366                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4367                                         <context link="stream" jump="distribution" field="holding_lib" />
4368                                 </retrieve>
4369                                 <update permission="ADMIN_SERIAL_ITEM">
4370                                         <context link="stream" jump="distribution" field="holding_lib" />
4371                                 </update>
4372                                 <delete permission="ADMIN_SERIAL_ITEM">
4373                                         <context link="stream" jump="distribution" field="holding_lib" />
4374                                 </delete>
4375                         </actions>
4376                 </permacrud>
4377         </class>
4378
4379         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4380                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4381                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4382                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4383                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4384                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4385                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4386                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4387                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4388                 </fields>
4389                 <links>
4390                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4391                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4392                 </links>
4393                 <!-- Not available via PCRUD at this time -->
4394         </class>
4395
4396         <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">
4397                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4398                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4399                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4400                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4401                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4402                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4403                 </fields>
4404                 <links>
4405                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4406                 </links>
4407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4408                         <actions>
4409                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4410                                         <context link="distribution" field="holding_lib" />
4411                                 </create>
4412                                 <retrieve/>
4413                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4414                                         <context link="distribution" field="holding_lib" />
4415                                 </update>
4416                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4417                                         <context link="distribution" field="holding_lib" />
4418                                 </delete>
4419                         </actions>
4420                 </permacrud>
4421         </class>
4422
4423         <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">
4424                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4425                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4426                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4427                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4428                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4429                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4430                 </fields>
4431                 <links>
4432                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4433                 </links>
4434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4435                         <actions>
4436                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4437                                         <context link="distribution" field="holding_lib" />
4438                                 </create>
4439                                 <retrieve/>
4440                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4441                                         <context link="distribution" field="holding_lib" />
4442                                 </update>
4443                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4444                                         <context link="distribution" field="holding_lib" />
4445                                 </delete>
4446                         </actions>
4447                 </permacrud>
4448         </class>
4449
4450         <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">
4451                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4452                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4453                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4454                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4455                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4456                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4457                 </fields>
4458                 <links>
4459                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4460                 </links>
4461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4462                         <actions>
4463                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4464                                         <context link="distribution" field="holding_lib" />
4465                                 </create>
4466                                 <retrieve/>
4467                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4468                                         <context link="distribution" field="holding_lib" />
4469                                 </update>
4470                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4471                                         <context link="distribution" field="holding_lib" />
4472                                 </delete>
4473                         </actions>
4474                 </permacrud>
4475         </class>
4476
4477         <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">
4478                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4479                         <field name="id" reporter:datatype="id" />
4480                         <field name="owning_copy" reporter:datatype="link"/>
4481                         <field name="stat_cat" reporter:datatype="link"/>
4482                         <field name="stat_cat_entry" reporter:datatype="link"/>
4483                 </fields>
4484                 <links>
4485                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4486                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4487                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4488                 </links>
4489         </class>
4490         <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">
4491                 <fields oils_persist:primary="code">
4492                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4493                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4494                 </fields>
4495                 <links/>
4496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4497             <actions>
4498                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4499                 <retrieve/>
4500                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4501                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4502             </actions>
4503         </permacrud>
4504         </class>
4505         <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">
4506                 <fields oils_persist:primary="code">
4507                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4508                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4509                 </fields>
4510                 <links/>
4511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4512             <actions>
4513                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4514                 <retrieve/>
4515                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4516                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4517             </actions>
4518         </permacrud>
4519         </class>
4520         <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">
4521                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4522                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4523                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4524                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4525                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4526                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4527                 </fields>
4528                 <links>
4529             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4530         </links>
4531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4532             <actions>
4533                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4534                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4535                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4536                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4537             </actions>
4538         </permacrud>
4539         </class>
4540         <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">
4541                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4542                         <field name="id" reporter:datatype="id" />
4543                         <field name="name" reporter:datatype="text"/>
4544                 </fields>
4545                 <links/>
4546         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4547             <actions>
4548                 <create permission="CREATE_LASSO" global_required="true"/>
4549                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4550                 <update permission="UPDATE_LASSO" global_required="true"/>
4551                 <delete permission="DELETE_LASSO" global_required="true"/>
4552             </actions>
4553         </permacrud>
4554         </class>
4555         <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">
4556                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4557                         <field name="id" reporter:datatype="id" />
4558                         <field name="lasso" reporter:datatype="link"/>
4559                         <field name="org_unit" reporter:datatype="org_unit"/>
4560                 </fields>
4561                 <links>
4562                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4563                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4564                 </links>
4565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4566             <actions>
4567                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4568                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4569                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4570                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4571             </actions>
4572         </permacrud>
4573         </class>
4574         <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">
4575                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4576                         <field name="id" reporter:datatype="id" />
4577                         <field name="from_org" reporter:datatype="org_unit"/>
4578                         <field name="to_org" reporter:datatype="org_unit"/>
4579                         <field name="prox" reporter:datatype="int" />
4580                 </fields>
4581                 <links>
4582                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4583                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4584                 </links>
4585         </class>
4586         <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">
4587                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4588                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4589                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4590                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4591                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4592                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4593                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4594                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4595                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4596                 </fields>
4597                 <links/>
4598         </class>
4599         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4600                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4601                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4602                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4603                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4604                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4605                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4606                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4607                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4608                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4609                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4610                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4611                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4612                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4613                 </fields>
4614                 <links>
4615                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4616                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4617                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4618                 </links>
4619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4620             <actions>
4621                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4622                 <retrieve/>
4623                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4624                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4625             </actions>
4626         </permacrud>
4627         </class>
4628         <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">
4629                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4630                         <field name="address_type"  reporter:datatype="text"/>
4631                         <field name="city"  reporter:datatype="text"/>
4632                         <field name="country"  reporter:datatype="text"/>
4633                         <field name="county"  reporter:datatype="text"/>
4634                         <field name="id" reporter:datatype="id" />
4635                         <field name="org_unit" reporter:datatype="org_unit"/>
4636                         <field name="post_code"  reporter:datatype="text"/>
4637                         <field name="state"  reporter:datatype="text"/>
4638                         <field name="street1"  reporter:datatype="text"/>
4639                         <field name="street2"  reporter:datatype="text"/>
4640                         <field name="valid" reporter:datatype="bool"/>
4641                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4642                 </fields>
4643                 <links>
4644                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4645                 </links>
4646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4647             <actions>
4648                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4649                 <retrieve/>
4650                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4651                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4652             </actions>
4653         </permacrud>
4654         </class>
4655         <!-- A note: Please update alhr when updating ahr -->
4656         <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">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4658                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4659                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4660                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4661                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4662                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4663                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4664                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4665                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4666                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4667                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4668                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4669                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4670                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4671                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4672                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4673                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4674                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4675                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4676                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4677                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4678                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4679                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4680                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4681                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4682                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4683                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4684                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4685                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4686                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4687                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4688                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4689                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4690                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4691                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4692                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4693                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4694                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4695                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4696                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4697                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4698                 </fields>
4699                 <links>
4700                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4701                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4702                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4703                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4704                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4705                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4706                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4707                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4708                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4709                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4710                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4711                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4712                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4713                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4714                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4715                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4716                 </links>
4717         </class>
4718         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4719                 <oils_persist:source_definition>
4720                         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)
4721                 </oils_persist:source_definition>
4722                 <fields oils_persist:primary="id">
4723                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4724                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4725                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4726                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4727                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4728                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4729                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4730                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4731                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4732                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4733                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4734                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4735                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4736                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4737                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4738                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4739                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4740                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4741                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4742                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4743                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4744                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4745                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4746                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4747                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4748                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4749                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4750                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4751                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4752                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4753                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4754                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4755                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4756                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4757                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4758                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4759                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4760                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4761                 </fields>
4762                 <links>
4763                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4764                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4765                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4766                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4767                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4768                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4769                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4770                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4771                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4772                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4773                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4774                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4775                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4776                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4777                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4778                 </links>
4779         </class>
4780
4781         <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">
4782                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4783                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4784                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4785                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4786                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4787                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4788                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4789                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4790                 </fields>
4791                 <links>
4792                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4793                 </links>
4794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4795                         <actions>
4796                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4797                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4798                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4799                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4800                         </actions>
4801                 </permacrud>
4802         </class>
4803         <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">
4804                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4805                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4806                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4807                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4808                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4809                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4810                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4811                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4812                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4813                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4814                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4815                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4816                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4817                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4818                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4819                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4820                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4821                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4822                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4823                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4824                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4825                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4826                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4827                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4828                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4829                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4830                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4831                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4832                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4833                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4834                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4835                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4836                 </fields>
4837                 <links>
4838                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4839                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4840                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4841                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4842                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4843                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4844                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4845                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4846                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4847                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4848                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4849                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4850                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4851                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4852                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4853                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4854                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4855                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4856                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4857                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4858                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4859                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4860                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4861                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4862                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4863                 </links>
4864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4865             <actions>
4866                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4867                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4868                     <context field="id"/>
4869                     <context field="parent_ou"/>
4870                                 </retrieve>
4871                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4872                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4873             </actions>
4874         </permacrud>
4875         </class>
4876         <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">
4877                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4878                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4879                         <field name="btype" reporter:datatype="text"/>
4880                         <field name="id" reporter:datatype="id" />
4881                         <field name="name"  reporter:datatype="text"/>
4882                         <field name="description" reporter:datatype="text"/>
4883                         <field name="owner" reporter:datatype="link"/>
4884                         <field name="pub" reporter:datatype="bool"/>
4885                         <field name="create_time" reporter:datatype="timestamp" />
4886                 </fields>
4887                 <links>
4888                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4889                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4890                 </links>
4891         </class>
4892         <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">
4893                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4894                         <field name="id" reporter:datatype="id" />
4895                         <field name="bucket" reporter:datatype="link"/>
4896                         <field name="note" reporter:datatype="text" />
4897                 </fields>
4898                 <links>
4899                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4900                 </links>
4901         </class>
4902         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4903                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4904                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4905                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4906                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4907                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4908                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4909                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4910                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4911                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4912                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4913                 </fields>
4914                 <links>
4915                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4916                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4917                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4918                 </links>
4919         </class>
4920         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4921                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4922                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4923                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4924                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4925                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4926                 </fields>
4927                 <links>
4928                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4929                 </links>
4930         </class>
4931     <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">
4932         <fields oils_persist:primary="field">
4933             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4934             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4935             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4936         </fields>
4937         <links/>
4938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4939             <actions>
4940                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4941                 <retrieve />
4942                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4943                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4944             </actions>
4945         </permacrud>
4946     </class>
4947         <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">
4948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4949                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4950                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4951                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4952                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4953                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4954                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4955                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4956                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4957                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4958                 </fields>
4959                 <links>
4960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4961                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4962                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4963                 </links>
4964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4965             <actions>
4966                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4967                 <retrieve />
4968                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4969                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4970             </actions>
4971         </permacrud>
4972         </class>
4973         <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">
4974                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4975                         <field name="field" reporter:datatype="link"/>
4976                         <field name="id" reporter:datatype="id" />
4977                         <field name="source" reporter:datatype="link"/>
4978                         <field name="value"  reporter:datatype="text"/>
4979                 </fields>
4980                 <links>
4981                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4982                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4983                 </links>
4984         </class>
4985         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4986                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4987                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4988                         <field name="btype" reporter:datatype="text"/>
4989                         <field name="id" reporter:datatype="id" />
4990                         <field name="name"  reporter:datatype="text"/>
4991                         <field name="description" reporter:datatype="text"/>
4992                         <field name="owner" reporter:datatype="link"/>
4993                         <field name="pub" reporter:datatype="bool"/>
4994                         <field name="create_time" reporter:datatype="timestamp" />
4995                 </fields>
4996                 <links>
4997                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4998                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4999                 </links>
5000         </class>
5001         <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">
5002                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5003                         <field name="id" reporter:datatype="id" />
5004                         <field name="bucket" reporter:datatype="link"/>
5005                         <field name="note" reporter:datatype="text" />
5006                 </fields>
5007                 <links>
5008                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5009                 </links>
5010         </class>
5011         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5012                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5013                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5014                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5015                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5016                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5017                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5018                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5019                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5020                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5021                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5022                 </fields>
5023                 <links>
5024                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5025                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5026                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5027                 </links>
5028         </class>
5029         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5030                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5031                         <field name="id" reporter:datatype="id" />
5032                         <field name="ind1" />
5033                         <field name="ind2" />
5034                         <field name="record" />
5035                         <field name="subfield" />
5036                         <field name="tag" />
5037                         <field name="value" />
5038                 </fields>
5039                 <links>
5040                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5041                 </links>
5042         </class>
5043         <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">
5044                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5045                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5046                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5047                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5048                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5049                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5050                 </fields>
5051                 <links>
5052                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5053                 </links>
5054         </class>
5055         <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">
5056                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5057                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5058                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5059                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5060                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5061                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5062                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5063                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5064                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5065                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5066                 </fields>
5067                 <links>
5068                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5069                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5070                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5071                 </links>
5072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5073             <actions>
5074                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5075                 <retrieve/>
5076                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5077                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5078             </actions>
5079         </permacrud>
5080         </class>
5081         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5082                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5083                         <field name="create_date" reporter:datatype="timestamp"/>
5084                         <field name="creator" reporter:datatype="link"/>
5085                         <field name="edit_date" reporter:datatype="timestamp"/>
5086                         <field name="editor" reporter:datatype="link"/>
5087                         <field name="id" reporter:datatype="id" />
5088                         <field name="pub" reporter:datatype="bool"/>
5089                         <field name="record" reporter:datatype="link"/>
5090                         <field name="value"  reporter:datatype="text"/>
5091                 </fields>
5092                 <links>
5093                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5094                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5095                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5096                 </links>
5097         </class>
5098         <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">
5099                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5100                         <field name="balance_owed" reporter:datatype="money" />
5101                         <field name="total_owed" reporter:datatype="money" />
5102                         <field name="total_paid" reporter:datatype="money" />
5103                         <field name="usr" reporter:datatype="link"/>
5104                 </fields>
5105                 <links>
5106                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5107                 </links>
5108         </class>
5109         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5110                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5111                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5112                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5113                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5114                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5115                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5116                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5117                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5118                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5119                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5120                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5121                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5122                 </fields>
5123                 <links>
5124                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5125                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5126                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5127                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5128                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5129                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5130                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5131                 </links>
5132         </class>
5133         <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">
5134                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5135                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5136                         <field name="quality" reporter:datatype="int" />
5137                         <field name="source" reporter:datatype="text"/>
5138                         <field name="transcendant" reporter:datatype="bool"/>
5139                         <field name="can_have_copies" reporter:datatype="bool"/>
5140                 </fields>
5141                 <links/>
5142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5143             <actions>
5144                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5145                 <retrieve/>
5146                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5147                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5148             </actions>
5149         </permacrud>
5150         </class>
5151         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5152                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5153                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5154                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5155                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5157                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5158                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5159                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5160                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5161                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5162                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5163                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5164                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5165                 </fields>
5166                 <links>
5167                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5168                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5170                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5171                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5172                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5173                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5174                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5175                 </links>
5176         </class>
5177         <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">
5178                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5179                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5180                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5181                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5182                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5183                 </fields>
5184                 <links>
5185                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5186                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5187                 </links>
5188         </class>
5189         <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">
5190                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5191                         <field name="bucket" reporter:datatype="link"/>
5192                         <field name="id" reporter:datatype="id" />
5193                         <field name="target_user" reporter:datatype="link"/>
5194                         <field name="create_time" reporter:datatype="timestamp" />
5195                         <field name="pos" reporter:datatype="int" />
5196                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5197                 </fields>
5198                 <links>
5199                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5200                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5201             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5202                 </links>
5203         </class>
5204         <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">
5205                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5206                         <field name="id" reporter:datatype="id" />
5207                         <field name="item" reporter:datatype="link"/>
5208                         <field name="note" reporter:datatype="text" />
5209                 </fields>
5210                 <links>
5211                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5212                 </links>
5213         </class>
5214         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5215                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5216                         <field name="balance_owed" reporter:datatype="money" />
5217                         <field name="total_owed" reporter:datatype="money" />
5218                         <field name="total_paid" reporter:datatype="money" />
5219                         <field name="usr" reporter:datatype="link"/>
5220                 </fields>
5221                 <links>
5222                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5223                 </links>
5224         </class>
5225         <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">
5226                 <fields oils_persist:primary="code" oils_persist:sequence="">
5227                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5228                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5229                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5230                 </fields>
5231                 <links/>
5232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5233             <actions>
5234                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5235                 <retrieve/>
5236                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5237                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5238             </actions>
5239         </permacrud>
5240         </class>
5241         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5242                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5243                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5244                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5245                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5246                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5247                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5248                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5249                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5250                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5251                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5252                 </fields>
5253                 <links>
5254                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5255                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5256                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5257                 </links>
5258         </class>
5259         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5260                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5261                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5262                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5263                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5264                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5265                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5266                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5267                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5268                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5270                 </fields>
5271                 <links>
5272                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5273                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5274                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5275                 </links>
5276         </class>
5277         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5278                 <fields oils_persist:primary="id" oils_persist:sequence="">
5279                         <field name="checkin_lib" reporter:datatype="link"/>
5280                         <field name="checkin_staff" reporter:datatype="link"/>
5281                         <field name="checkin_time" reporter:datatype="timestamp"/>
5282                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5283                         <field name="circ_staff" reporter:datatype="link"/>
5284                         <field name="desk_renewal" reporter:datatype="bool"/>
5285                         <field name="due_date" reporter:datatype="timestamp"/>
5286                         <field name="duration" reporter:datatype="interval"/>
5287                         <field name="duration_rule" reporter:datatype="link"/>
5288                         <field name="fine_interval" reporter:datatype="interval"/>
5289                         <field name="id" reporter:datatype="id" />
5290                         <field name="max_fine" reporter:datatype="money" />
5291                         <field name="max_fine_rule" reporter:datatype="link"/>
5292                         <field name="opac_renewal" reporter:datatype="bool"/>
5293                         <field name="phone_renewal" reporter:datatype="bool"/>
5294                         <field name="recurring_fine" reporter:datatype="money" />
5295                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5296                         <field name="renewal_remaining" reporter:datatype="int" />
5297             <field name="grace_period" reporter:datatype="interval" />
5298                         <field name="stop_fines" reporter:datatype="text"/>
5299                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5300                         <field name="target_copy" reporter:datatype="link"/>
5301                         <field name="usr" reporter:datatype="link"/>
5302                         <field name="xact_finish" reporter:datatype="timestamp" />
5303                         <field name="xact_start" reporter:datatype="timestamp" />
5304                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5305                 </fields>
5306                 <links>
5307                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5308                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5309                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5310                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5311                 </links>
5312         </class>
5313         <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">
5314                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5315                         <field name="field" reporter:datatype="link"/>
5316                         <field name="id" reporter:datatype="id" />
5317                         <field name="source" reporter:datatype="link"/>
5318                         <field name="value" reporter:datatype="text"/>
5319                 </fields>
5320                 <links>
5321                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5322                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5323                 </links>
5324         </class>
5325         <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">
5326                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5327                         <field name="high" reporter:datatype="money" />
5328                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5329                         <field name="low" reporter:datatype="money" />
5330                         <field name="name" reporter:datatype="text"/>
5331                         <field name="normal" reporter:datatype="money" />
5332                         <field name="recurrence_interval" reporter:datatype="interval"/>
5333             <field name="grace_period" reporter:datatype="interval" />
5334                 </fields>
5335                 <links/>
5336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5337             <actions>
5338                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5339                 <retrieve/>
5340                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5341                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5342             </actions>
5343         </permacrud>
5344         </class>
5345         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5346                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5347                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5348                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5349                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5350                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5351                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5352                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5353                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5354                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5355                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5356                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5357                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5358                 </fields>
5359                 <links>
5360                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5361                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5362                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5363                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5364                 </links>
5365         </class>
5366         <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">
5367                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5368                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5369                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5370                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5371                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5372                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5373                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5374                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5375                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5376                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5377                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5378                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5379                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5380                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5381                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5382                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5383                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5384                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5385                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5386                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5387                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5388                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5389                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5390                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5391                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5392                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5393                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5394                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5395                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5396                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5397                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5398                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5399                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5400                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5401                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5402                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5403                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5404                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5405                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5406                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5407                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5408                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5409                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5410                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5411                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5412                 </fields>
5413                 <links>
5414                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5415                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5416                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5417                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5418                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5419                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5420                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5421                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5422                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5423                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5424                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5425                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5426                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5427                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5428                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5429                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5430                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5431                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5432                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5433                 </links>
5434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5435             <actions>
5436                 <create permission="CREATE_COPY">
5437                     <context link="call_number" field="owning_lib"/>
5438                 </create>
5439                 <retrieve/>
5440                 <update permission="UPDATE_COPY">
5441                     <context link="call_number" field="owning_lib"/>
5442                 </update>
5443                 <delete permission="DELETE_COPY">
5444                     <context link="call_number" field="owning_lib"/>
5445                 </delete>
5446             </actions>
5447         </permacrud>
5448         </class>
5449
5450         <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">
5451                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5452                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5453                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5454                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5455                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5456                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5457                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5458                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5459                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5460                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5461                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5462                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5463                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5464                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5465                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5466                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5467                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5468                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5469                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5470                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5471                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5472                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5473                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5474                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5475                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5476                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5477                 </fields>
5478                 <links>
5479                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5480                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5481                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5482                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5483                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5484                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5485                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5486                 </links>
5487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5488                         <actions>
5489                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5490                                 <retrieve />
5491                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5492                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5493                         </actions>
5494                 </permacrud>
5495         </class>
5496
5497         <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">
5498                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5499                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5500                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5501                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5502                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5503                 </fields>
5504                 <links/>
5505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5506             <actions>
5507                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5508                 <retrieve/>
5509                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5510                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5511             </actions>
5512         </permacrud>
5513         </class>
5514         <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">
5515                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5516                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5517                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5518                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5519                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5520                 </fields>
5521                 <links/>
5522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5523             <actions>
5524                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5525                 <retrieve/>
5526                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5527                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5528             </actions>
5529         </permacrud>
5530         </class>
5531         <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">
5532                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5533                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5535                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5536                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5537                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5538                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5539                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5540                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5541                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5542                 </fields>
5543                 <links>
5544                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5545                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5546                 </links>
5547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5548             <actions>
5549                 <create permission="CREATE_PERM" global_required="true"/>
5550                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5551                 <update permission="UPDATE_PERM" global_required="true"/>
5552                 <delete permission="DELETE_PERM" global_required="true"/>
5553             </actions>
5554         </permacrud>
5555         </class>
5556         <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">
5557                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5558                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5559                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5560                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5561                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5562                 </fields>
5563                 <links>
5564                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5565                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5566                 </links>
5567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5568             <actions>
5569                 <create permission="ADMIN_SURVEY">
5570                     <context link="question" jump="survey" field="owner"/>
5571                 </create>
5572                 <retrieve/>
5573                 <update permission="ADMIN_SURVEY">
5574                     <context link="question" jump="survey" field="owner"/>
5575                 </update>
5576                 <delete permission="ADMIN_SURVEY">
5577                     <context link="question" jump="survey" field="owner"/>
5578                 </delete>
5579             </actions>
5580         </permacrud>
5581         </class>
5582         <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">
5583                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5584                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5585                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5586                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5587                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5588                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5589                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5590                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5591                 </fields>
5592                 <links>
5593                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5594                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5595                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5596                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5597                 </links>
5598         </class>
5599         <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">
5600                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5601                         <field name="balance_owed" reporter:datatype="money" />
5602                         <field name="total_owed" reporter:datatype="money" />
5603                         <field name="total_paid" reporter:datatype="money" />
5604                         <field name="usr" reporter:datatype="link"/>
5605                 </fields>
5606                 <links>
5607                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5608                 </links>
5609         </class>
5610         <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">
5611                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5612                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5613                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5614                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5615                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5616                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5617                 </fields>
5618                 <links>
5619                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5620                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5621                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5622                 </links>
5623         </class>
5624         <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">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5626                         <field name="field" reporter:datatype="link"/>
5627                         <field name="id" reporter:datatype="id" />
5628                         <field name="source" reporter:datatype="link"/>
5629                         <field name="value" reporter:datatype="text"/>
5630                 </fields>
5631                 <links>
5632                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5633                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5634                 </links>
5635         </class>
5636         <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">
5637                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5638                         <field name="field" reporter:datatype="link"/>
5639                         <field name="id" reporter:datatype="id" />
5640                         <field name="source" reporter:datatype="link"/>
5641                         <field name="value" reporter:datatype="text"/>
5642                 </fields>
5643                 <links>
5644                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5645                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5646                 </links>
5647         </class>
5648         <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">
5649                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5650                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5651                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5652                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5653                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5654                 </fields>
5655                 <links>
5656                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5657                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5658                 </links>
5659         </class>
5660         <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">
5661                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5662                         <field name="depth" reporter:datatype="int" />
5663                         <field name="grantable" reporter:datatype="bool"/>
5664                         <field name="grp" reporter:datatype="link"/>
5665                         <field name="id" reporter:datatype="id" />
5666                         <field name="perm" reporter:datatype="link"/>
5667                 </fields>
5668                 <links>
5669                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5670                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5671                 </links>
5672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5673             <actions>
5674                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5675                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5676                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5677                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5678             </actions>
5679         </permacrud>
5680         </class>
5681         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5682                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5683                         <field name="items" oils_persist:virtual="true" />
5684                         <field name="btype" reporter:datatype="text"/>
5685                         <field name="id" reporter:datatype="id" />
5686                         <field name="name" reporter:datatype="text"/>
5687                         <field name="description" reporter:datatype="text"/>
5688                         <field name="owner" reporter:datatype="link"/>
5689                         <field name="pub" reporter:datatype="bool"/>
5690                         <field name="create_time" reporter:datatype="timestamp" />
5691                 </fields>
5692                 <links>
5693                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5694                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5695                 </links>
5696         </class>
5697         <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">
5698                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5699                         <field name="id" reporter:datatype="id" />
5700                         <field name="bucket" reporter:datatype="link"/>
5701                         <field name="note" reporter:datatype="text" />
5702                 </fields>
5703                 <links>
5704                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5705                 </links>
5706         </class>
5707         <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">
5708                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5709                         <field name="id" reporter:datatype="int" />
5710                         <field name="usr" reporter:datatype="link"/>
5711                         <field name="work_ou" reporter:datatype="link"/>
5712                 </fields>
5713                 <links>
5714                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5715                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5716                 </links>
5717         </class>
5718         <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">
5719                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5720                         <field name="depth" reporter:datatype="int"/>
5721                         <field name="grantable" reporter:datatype="bool"/>
5722                         <field name="id" reporter:datatype="id" />
5723                         <field name="perm" reporter:datatype="link"/>
5724                         <field name="usr" reporter:datatype="link"/>
5725                 </fields>
5726                 <links>
5727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5728                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5729                 </links>
5730         </class>
5731         <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">
5732                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5733                         <field name="object_id" reporter:datatype="text"/>
5734                         <field name="grantable" reporter:datatype="bool"/>
5735                         <field name="id" reporter:datatype="id" />
5736                         <field name="perm" reporter:datatype="link"/>
5737                         <field name="usr" reporter:datatype="link"/>
5738                         <field name="object_type" reporter:datatype="text"/>
5739                 </fields>
5740                 <links>
5741                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5742                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5743                 </links>
5744         </class>
5745         <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">
5746                 <fields oils_persist:primary="id" oils_persist:sequence="">
5747                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5748                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5749                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5750                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5751                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5752                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5753                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5754                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5755                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5756                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5757                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5758                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5759                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5760                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5761                 </fields>
5762                 <links>
5763                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5764                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5765                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5766                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5767                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5768                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5769                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5770                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5771                 </links>
5772         </class>
5773         <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">
5774                 <fields oils_persist:primary="id" oils_persist:sequence="">
5775                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5776                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5777                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5778                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5780                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5781                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5782                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5783                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5784                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5785                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5786                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5787                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5788                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5789                 </fields>
5790                 <links>
5791                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5792                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5793                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5794                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5795                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5796                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5797                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5798                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5799                 </links>
5800         </class>
5801         <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">
5802                 <fields oils_persist:primary="id" oils_persist:sequence="">
5803                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5804                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5805                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5806                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5807                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5808                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5809                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5810                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5811                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5812                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5813                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5814                 </fields>
5815                 <links>
5816                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5817                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5818                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5819                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5820                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5821                 </links>
5822         </class>
5823         <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">
5824                 <fields oils_persist:primary="id" oils_persist:sequence="">
5825                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5826                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5827                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5828                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5829                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5830                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5831                         <field reporter:label="Accepting User" name="accepting_usr" />
5832                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5833                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5834                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5835                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5836                         <field reporter:label="Check Payment" name="check_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="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5842                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5843                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5844                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5845                 </links>
5846         </class>
5847         <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">
5848                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5849                         <field name="bucket" reporter:datatype="link"/>
5850                         <field name="id" reporter:datatype="id" />
5851                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5852                         <field name="create_time" reporter:datatype="timestamp" />
5853                         <field name="pos" reporter:datatype="int" />
5854                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5855                 </fields>
5856                 <links>
5857                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5858                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5859             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5860                 </links>
5861         </class>
5862         <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">
5863                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5864                         <field name="id" reporter:datatype="id" />
5865                         <field name="item" reporter:datatype="link"/>
5866                         <field name="note" reporter:datatype="text" />
5867                 </fields>
5868                 <links>
5869                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5870                 </links>
5871         </class>
5872         <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">
5873                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5874                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5875                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5876                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5877                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5878                 </fields>
5879                 <links>
5880                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5881                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5882                 </links>
5883         </class>
5884     <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">
5885         <fields oils_persist:primary="field">
5886             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5887             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5888             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5889         </fields>
5890         <links/>
5891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5892             <actions>
5893                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5894                 <retrieve />
5895                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5896                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5897             </actions>
5898         </permacrud>
5899     </class>
5900         <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">
5901                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5902                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5903                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5904                 </fields>
5905                 <links/>
5906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5907             <actions>
5908                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5909                 <retrieve/>
5910                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5911                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5912             </actions>
5913         </permacrud>
5914         </class>
5915
5916
5917         <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">
5918                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5919                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5920                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5921                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5922                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5923                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5924                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5925                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5926                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5927                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5928                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5929                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5930                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5931                 </fields>
5932                 <links>
5933                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5934                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5935                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5936                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5937                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5938                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5939                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5940                 </links>
5941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5942             <actions>
5943                 <create permission="TRANSIT_COPY">
5944                     <context link="target_copy" field="owner"/>
5945                 </create>
5946                 <retrieve/>
5947                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5948                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5949             </actions>
5950         </permacrud>
5951         </class>
5952         <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">
5953                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5954                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5955                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5956                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5957                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5958                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5959                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5960                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5961                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5962                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5963                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5964                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5966                 </fields>
5967                 <links>
5968                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5969                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5970                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5971                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5972                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5973                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5974                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5975                 </links>
5976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5977             <actions>
5978                 <create permission="TRANSIT_COPY" context_field="owner">
5979                     <context link="target_copy" field="circ_lib"/>
5980                 </create>
5981                 <retrieve/>
5982                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5983                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5984             </actions>
5985         </permacrud>
5986         </class>
5987         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5988                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5989                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5990                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5991                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5992                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5993                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5994                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5995                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5996                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5997                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5998                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5999                 </fields>
6000                 <links>
6001                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6002                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6003                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6004                 </links>
6005         </class>
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6008                         <field name="grp" />
6009                         <field name="id" reporter:datatype="id" />
6010                         <field name="usr" />
6011                 </fields>
6012                 <links>
6013                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6014                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6015                 </links>
6016         </class>
6017         <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">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6019                         <field name="id" reporter:datatype="id" />
6020                         <field name="fq_field" reporter:datatype="text"/>
6021                         <field name="identity_value" reporter:datatype="text"/>
6022                         <field name="translation" reporter:datatype="text"/>
6023                         <field name="string" reporter:datatype="text"/>
6024                 </fields>
6025                 <links>
6026                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6027                 </links>
6028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6029             <actions>
6030                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6031                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6032                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6033                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6034             </actions>
6035         </permacrud>
6036         </class>
6037         <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">
6038                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6039                         <field name="id" reporter:datatype="id" />
6040                         <field name="fm_class" reporter:datatype="text"/>
6041                         <field name="field" reporter:datatype="text"/>
6042                         <field name="owner" reporter:datatype="org_unit"/>
6043                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6044                 </fields>
6045                 <links>
6046                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6047                 </links>
6048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6049             <actions>
6050                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6051                 <retrieve/>
6052                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6053                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6054             </actions>
6055         </permacrud>
6056         </class>
6057         <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">
6058                 <fields oils_persist:primary="code">
6059                         <field name="code" reporter:datatype="id" />
6060                         <field name="marc_code" reporter:datatype="text"/>
6061                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6062                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6063                 </fields>
6064                 <links/>
6065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6066             <actions>
6067                 <create permission="CREATE_LOCALE" global_required="true"/>
6068                 <retrieve/>
6069                 <update permission="UPDATE_LOCALE" global_required="true"/>
6070                 <delete permission="DELETE_LOCALE" global_required="true"/>
6071             </actions>
6072         </permacrud>
6073         </class>
6074         <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">
6075                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6076                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6077                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6078                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6079             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6080                 </fields>
6081                 <links>
6082                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6083                 </links>
6084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6085             <actions>
6086                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6087                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6088                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6089                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6090             </actions>
6091         </permacrud>
6092         </class>
6093
6094         <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">
6095                 <fields oils_persist:primary="id">
6096                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6097                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6098                 </fields>
6099                 <links/>
6100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6101             <actions>
6102                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6103                 <retrieve/>
6104                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6105                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6106             </actions>
6107         </permacrud>
6108         </class>
6109
6110         <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">
6111                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6112                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6113                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6114                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6115                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6116                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6117                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6118                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6119                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6120                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6121                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6122                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6123                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6124                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6125                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6126                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6127                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6128                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6129                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6130                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6131                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6132                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6133                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6134                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6135                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6136                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6137                 </fields>
6138                 <links>
6139                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6140                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6141                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6142                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6143                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6144                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6145                 </links>
6146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6147             <actions>
6148                 <create permission="user_request.create">
6149                     <context link="usr" field="home_ou"/>
6150                                 </create>
6151                 <retrieve permission="user_request.view">
6152                     <context link="usr" field="home_ou"/>
6153                                 </retrieve>
6154                 <update permission="user_request.update">
6155                     <context link="usr" field="home_ou"/>
6156                                 </update>
6157                 <delete permission="user_request.delete">
6158                     <context link="usr" field="home_ou"/>
6159                                 </delete>
6160             </actions>
6161         </permacrud>
6162         </class>
6163
6164         <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">
6165                 <fields oils_persist:primary="code">
6166                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6167                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6168                 </fields>
6169                 <links/>
6170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6171             <actions>
6172                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6173                 <retrieve/>
6174                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6175                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6176             </actions>
6177         </permacrud>
6178         </class>
6179
6180         <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">
6181                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6182                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6183                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6184                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6185                         <field reporter:label="Ratio" name="ratio" />
6186                 </fields>
6187                 <links>
6188                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6189                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6190                 </links>
6191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6192                         <actions>
6193                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6194                                 <retrieve/>
6195                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6196                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6197                         </actions>
6198                 </permacrud>
6199         </class>
6200
6201         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6202                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6203                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6204                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6205                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6206                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6207                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6208                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6209                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6210                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6211                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6212                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6213                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6214                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6215                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6216                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6217                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6218                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6219                 </fields>
6220                 <links>
6221                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6222                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6223             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6224             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6225             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6226                 </links>
6227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6228             <actions>
6229                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6230                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6231                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6232                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6233             </actions>
6234         </permacrud>
6235         </class>
6236
6237         <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">
6238                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6239                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6240                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6241                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6242                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6243                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6244                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6245                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6246                 </fields>
6247                 <links>
6248                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6249                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6250                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6251                 </links>
6252         </class>
6253
6254         <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">
6255                 <fields oils_persist:primary="code">
6256                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6257                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6258                 </fields>
6259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6260             <actions>
6261                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6262                 <retrieve/>
6263                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6264                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6265             </actions>
6266                 </permacrud>
6267         </class>
6268
6269         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6270                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6271                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6272                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6273                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6274                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6275                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6276                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6277                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6278                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6279                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6280                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6281                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6282                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6283                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6284                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6285                 </fields>
6286                 <links>
6287                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6288                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6289                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6290                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6291                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6292                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6293                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6294                 </links>
6295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6296             <actions>
6297                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6298                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6299                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6300                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6301             </actions>
6302         </permacrud>
6303         </class>
6304
6305         <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">
6306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6307                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6308                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6309                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6310                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6311                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6312                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6313                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6314                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6315                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6316                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6317                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6318                 </fields>
6319                 <links>
6320                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6321                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6322                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6323                 </links>
6324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6325             <actions>
6326                 <create   permission="ADMIN_INVOICE">
6327                                         <context link="invoice" field="receiver"/>
6328                                 </create>
6329                 <retrieve permission="ADMIN_INVOICE">
6330                                         <context link="invoice" field="receiver"/>
6331                                 </retrieve>
6332                 <update   permission="ADMIN_INVOICE">
6333                                         <context link="invoice" field="receiver"/>
6334                                 </update>
6335                                 <delete   permission="ADMIN_INVOICE">
6336                                         <context link="invoice" field="receiver"/>
6337                                 </delete>
6338             </actions>
6339         </permacrud>
6340         </class>
6341
6342         <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">
6343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6344                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6345                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6346                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6347                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6348                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6349                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6350                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6351                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6352                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6353                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6354                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6355                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6356                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6357                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6358                 </fields>
6359                 <links>
6360                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6361                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6362                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6363                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6364                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6365                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6366                 </links>
6367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6368             <actions>
6369                 <create   permission="ADMIN_INVOICE">
6370                                         <context link="invoice" field="receiver"/>
6371                                 </create>
6372                 <retrieve permission="ADMIN_INVOICE">
6373                                         <context link="invoice" field="receiver"/>
6374                                 </retrieve>
6375                 <update   permission="ADMIN_INVOICE">
6376                                         <context link="invoice" field="receiver"/>
6377                                 </update>
6378                                 <delete   permission="ADMIN_INVOICE">
6379                                         <context link="invoice" field="receiver"/>
6380                                 </delete>
6381             </actions>
6382         </permacrud>
6383         </class>
6384
6385         <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">
6386                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6387                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6388                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6389                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6390                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6392                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6393                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6394                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6395                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6396                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6397                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6398                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6399                 </fields>
6400                 <links>
6401                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6402                 </links>
6403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6404             <actions>
6405                 <create permission="ADMIN_PROVIDER">
6406                     <context link="provider" field="owner"/>
6407                 </create>
6408                 <retrieve permission="ADMIN_PROVIDER">
6409                     <context link="provider" field="owner"/>
6410                 </retrieve>
6411                 <update permission="ADMIN_PROVIDER">
6412                     <context link="provider" field="owner"/>
6413                 </update>
6414                 <delete permission="ADMIN_PROVIDER">
6415                     <context link="provider" field="owner"/>
6416                 </delete>
6417             </actions>
6418         </permacrud>
6419         </class>
6420
6421         <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">
6422                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6423                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6424                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6425                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6426                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6427                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6428                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6429         </fields>
6430                 <links>
6431                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6432                 </links>
6433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6434             <actions>
6435                 <create permission="ADMIN_PROVIDER">
6436                     <context link="provider" field="owner"/>
6437                 </create>
6438                 <retrieve permission="ADMIN_PROVIDER">
6439                     <context link="provider" field="owner"/>
6440                 </retrieve>
6441                 <update permission="ADMIN_PROVIDER">
6442                     <context link="provider" field="owner"/>
6443                 </update>
6444                 <delete permission="ADMIN_PROVIDER">
6445                     <context link="provider" field="owner"/>
6446                 </delete>
6447             </actions>
6448         </permacrud>
6449     </class>
6450         <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">
6451                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6452                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6453                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6454                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6455                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6456                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6457                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6458                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6459                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6460                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6461                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6462                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6463                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6464                 </fields>
6465                 <links>
6466                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6467                 </links>
6468         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6469             <actions>
6470                 <create permission="ADMIN_PROVIDER">
6471                     <context link="contact" jump='provider' field="owner"/>
6472                 </create>
6473                 <retrieve permission="ADMIN_PROVIDER">
6474                     <context link="contact" jump='provider' field="owner"/>
6475                 </retrieve>
6476                 <update permission="ADMIN_PROVIDER">
6477                     <context link="contact" jump='provider' field="owner"/>
6478                 </update>
6479                 <delete permission="ADMIN_PROVIDER">
6480                     <context link="contact" jump='provider' field="owner"/>
6481                 </delete>
6482             </actions>
6483         </permacrud>
6484         </class>
6485
6486         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6488                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6489                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6490                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6491                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6492                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6493                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6494                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6495                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6496                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6497                 </fields>
6498                 <links>
6499                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6500                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6501                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6502                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6503                 </links>
6504         </class>
6505
6506         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6508                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6509                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6510                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6511                 </fields>
6512                 <links>
6513             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6514                 </links>
6515                 <!--
6516                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6517                         But here's what it should look like if we ever do use pcrud.
6518                 -->
6519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6520                         <actions>
6521                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6522                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6523                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6524                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6525                         </actions>
6526                 </permacrud>
6527         </class>
6528
6529         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6530                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6531                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6532                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6533                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6534                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6535                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6536                 </fields>
6537                 <links>
6538                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6539                 </links>
6540                 <!--
6541                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6542                         But here's what it should look like if we ever do use pcrud.
6543                 -->
6544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6545                         <actions>
6546                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6547                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6548                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6549                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6550                         </actions>
6551                 </permacrud>
6552         </class>
6553
6554         <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">
6555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6556                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6557                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6558                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6559                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6560                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6561                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6562                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6563                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6564                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6565                 </fields>
6566                 <links>
6567                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6568                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6569             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6570             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6571                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6572                 </links>
6573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6574             <actions>
6575                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6576                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6577                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6578                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6579             </actions>
6580         </permacrud>
6581         </class>
6582
6583         <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">
6584                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6585                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6586                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6587                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6588                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6589                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6590                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6591                 </fields>
6592                 <links>
6593                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6594                 </links>
6595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6596                         <actions>
6597                                 <create permission="ADMIN_FUNDING_SOURCE">
6598                     <context link="funding_source" field="owner"/>
6599                 </create>
6600                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6601                     <context link="funding_source" field="owner"/>
6602                 </retrieve>
6603                                 <update permission="ADMIN_FUNDING_SOURCE">
6604                     <context link="funding_source" field="owner"/>
6605                 </update>
6606                                 <delete permission="ADMIN_FUNDING_SOURCE">
6607                     <context link="funding_source" field="owner"/>
6608                 </delete>
6609                         </actions>
6610                 </permacrud>
6611         </class>
6612
6613         <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">
6614                 <fields oils_persist:primary="id">
6615                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6616                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6617                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6618                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6619                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6620                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6621                 </fields>
6622                 <links>
6623                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6624                 </links>
6625         </class>
6626
6627         <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">
6628                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6629                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6630                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6631                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6632                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6633                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6634                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6635                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6636                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6637                 </fields>
6638                 <links>
6639                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6640                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6641                 </links>
6642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6643                         <actions>
6644                                 <create permission="ADMIN_ACQ_FUND">
6645                     <context link="fund" field="org"/>
6646                 </create>
6647                                 <retrieve permission="ADMIN_ACQ_FUND">
6648                     <context link="fund" field="org"/>
6649                 </retrieve>
6650                                 <update permission="ADMIN_ACQ_FUND">
6651                     <context link="fund" field="org"/>
6652                 </update>
6653                                 <delete permission="ADMIN_ACQ_FUND">
6654                     <context link="fund" field="org"/>
6655                 </delete>
6656                         </actions>
6657                 </permacrud>
6658         </class>
6659
6660         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6661                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6662                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6663                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6664                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6665                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6666                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6667                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6668                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6669                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6670                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6671                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6672                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6673                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6674                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6675                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6676                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6677                 </fields>
6678                 <links>
6679                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6680                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6681             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6682             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6683             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6684                 </links>
6685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6686             <actions>
6687                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6688                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6689                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6690                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6691             </actions>
6692         </permacrud>
6693         </class>
6694
6695         <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">
6696                 <fields oils_persist:primary="fund">
6697                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6698                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6699                 </fields>
6700                 <links>
6701                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6702                 </links>
6703         </class>
6704
6705         <class id="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">
6706                 <fields oils_persist:primary="fund">
6707                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6708                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6709                 </fields>
6710                 <links>
6711                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6712                 </links>
6713         </class>
6714
6715         <class id="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">
6716                 <fields oils_persist:primary="fund">
6717                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6718                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6719                 </fields>
6720                 <links>
6721                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6722                 </links>
6723         </class>
6724
6725         <class id="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">
6726                 <fields oils_persist:primary="fund">
6727                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6728                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6729                 </fields>
6730                 <links>
6731                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6732                 </links>
6733         </class>
6734
6735         <class id="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">
6736                 <fields oils_persist:primary="fund">
6737                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6738                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6739                 </fields>
6740                 <links>
6741                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6742                 </links>
6743         </class>
6744
6745    <class id="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">
6746         <fields oils_persist:primary="fund">
6747             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6748             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6749         </fields>
6750         <links>
6751             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6752         </links>
6753     </class>
6754
6755    <class id="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">
6756         <fields oils_persist:primary="fund">
6757             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6758             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6759         </fields>
6760         <links>
6761             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6762         </links>
6763     </class>
6764
6765    <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">
6766         <fields oils_persist:primary="fund">
6767             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6768             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6769         </fields>
6770         <links>
6771             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6772         </links>
6773     </class>
6774
6775    <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">
6776         <fields oils_persist:primary="fund">
6777             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6778             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6779         </fields>
6780         <links>
6781             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6782         </links>
6783     </class>
6784
6785    <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">
6786         <fields oils_persist:primary="fund">
6787             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6788             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6789         </fields>
6790         <links>
6791             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6792         </links>
6793     </class>
6794
6795         <class id="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">
6796                 <fields oils_persist:primary="funding_source">
6797                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6798                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6799                 </fields>
6800                 <links>
6801                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6802                 </links>
6803         </class>
6804
6805         <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">
6806                 <fields oils_persist:primary="funding_source">
6807                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6808                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6809                 </fields>
6810                 <links>
6811                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6812                 </links>
6813         </class>
6814
6815         <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">
6816                 <fields oils_persist:primary="funding_source">
6817                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6818                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6819                 </fields>
6820                 <links>
6821                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6822                 </links>
6823         </class>
6824
6825         <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">
6826                 <fields oils_persist:primary="fund">
6827                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6828                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6829                 </fields>
6830                 <links>
6831                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6832                 </links>
6833         </class>
6834
6835         <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">
6836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6837                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6838                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6839                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6840                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6841                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6842                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6843                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6844                 </fields>
6845                 <links>
6846                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6847                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6848                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6849                 </links>
6850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6851                         <actions>
6852                                 <create permission="ADMIN_ACQ_FUND">
6853                     <context link="fund" field="org"/>
6854                 </create>
6855                                 <retrieve permission="ADMIN_ACQ_FUND">
6856                     <context link="fund" field="org"/>
6857                 </retrieve>
6858                                 <update permission="ADMIN_ACQ_FUND">
6859                     <context link="fund" field="org"/>
6860                 </update>
6861                                 <delete permission="ADMIN_ACQ_FUND">
6862                     <context link="fund" field="org"/>
6863                 </delete>
6864                         </actions>
6865                 </permacrud>
6866         </class>
6867
6868     <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">
6869         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6870             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6871             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6872             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6873             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6874             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6875             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6876             <field reporter:label="Note" name="note" reporter:datatype="text" />
6877             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6878         </fields>
6879         <links>
6880             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6881             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6882             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6883         </links>
6884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6885                         <actions>
6886                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6887                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6888                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6889                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6890                         </actions>
6891                 </permacrud>
6892     </class>
6893
6894         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6896                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6897                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6898                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6899                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6900                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6901                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6902                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6903                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6904                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6905                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6906                 </fields>
6907                 <links>
6908                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6909                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6910                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6911                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6912                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6913                 </links>
6914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6915                         <actions>
6916                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6917                         </actions>
6918                 </permacrud>
6919         </class>
6920
6921         <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">
6922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6923                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6924                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6925                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6926                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6927                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6928                 </fields>
6929                 <links>
6930                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6931                 </links>
6932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6933                         <actions>
6934                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6935                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6936                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6937                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6938                         </actions>
6939                 </permacrud>
6940         </class>
6941
6942         <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">
6943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6944                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6945                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6946                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6947                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6948                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6949                         <field reporter:label="State" name="state" reporter:datatype="text" />
6950                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6951                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6952                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6953                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6954                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6955                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6956                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6957                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6958                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6959                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6960                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6961                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6962                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6963                 </fields>
6964                 <links>
6965                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6966                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6967                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6968                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6969                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6970                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6971                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6972                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6973                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6974                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6975                 </links>
6976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6977                         <actions>
6978                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6979                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6980                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6981                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6982                         </actions>
6983                 </permacrud>
6984         </class>
6985
6986         <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">
6987                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6988                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6989                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6990                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6991                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6992                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6993                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6994                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6995                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6996                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6997                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6998                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6999                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7000                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7001                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7002                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7003                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7004                 </fields>
7005                 <links>
7006                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7007                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7008                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7009                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7010                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7011                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7012                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7013                 </links>
7014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7015             <actions>
7016                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7017             </actions>
7018                 </permacrud>
7019         </class>
7020
7021         <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">
7022                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7023                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7024                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7025                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7026                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7027                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7028                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7029                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7030                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7031                 </fields>
7032                 <links>
7033                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7034                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7035                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7036                 </links>
7037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7038             <actions>
7039                 <create permission="CREATE_PURCHASE_ORDER">
7040                     <context link="purchase_order" field="ordering_agency"/>
7041                 </create>
7042                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7043                     <context link="purchase_order" field="ordering_agency"/>
7044                 </retrieve>
7045                 <update permission="CREATE_PURCHASE_ORDER">
7046                     <context link="purchase_order" field="ordering_agency"/>
7047                 </update>
7048                 <delete permission="CREATE_PURCHASE_ORDER">
7049                     <context link="purchase_order" field="ordering_agency"/>
7050                 </delete>
7051             </actions>
7052                 </permacrud>
7053         </class>
7054
7055         <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">
7056                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7057                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7058                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7059                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7060                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7061                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7062                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7063                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7064                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7065                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7066                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7067                 </fields>
7068                 <links>
7069                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7070                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7071                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7072                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7073                 </links>
7074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7075             <actions>
7076                 <create permission="CREATE_PURCHASE_ORDER">
7077                     <context link="purchase_order" field="ordering_agency"/>
7078                 </create>
7079                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7080                     <context link="purchase_order" field="ordering_agency"/>
7081                 </retrieve>
7082                 <update permission="CREATE_PURCHASE_ORDER">
7083                     <context link="purchase_order" field="ordering_agency"/>
7084                 </update>
7085                 <delete permission="CREATE_PURCHASE_ORDER">
7086                     <context link="purchase_order" field="ordering_agency"/>
7087                 </delete>
7088             </actions>
7089                 </permacrud>
7090         </class>
7091
7092         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7094                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7095                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7096                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7097                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7098                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7099                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7100                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7101                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7102                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7103                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7104                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7105                         <field reporter:label="State" name="state" reporter:datatype="text" />
7106                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7107                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7108                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7109                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7110                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7111                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7112                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7113                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7114                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7115                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7116                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7117                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7118                 </fields>
7119                 <links>
7120                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7121                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7122                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7123                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7124                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7125                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7126                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7127                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7128                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7129                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7130                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7131                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7132                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7133                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7134                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7135                 </links>
7136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7137                         <actions>
7138                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7139                                         <context link="purchase_order" field="ordering_agency"/>
7140                                         <context link="picklist" field="org_unit"/>
7141                                 </retrieve>
7142                         </actions>
7143                 </permacrud>
7144         </class>
7145
7146         <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">
7147                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7148                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7149                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7150                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7151                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7152                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7153                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7154                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7155                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7156                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7157                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7158                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7159                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7160                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7161                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7162                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7163                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7164                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7165                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7166                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7167                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7168                 </fields>
7169                 <links>
7170                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7171                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7172                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7173                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7174                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7175                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7176                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7177                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7178                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7179                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7180                 </links>
7181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7182                         <actions>
7183                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7184                                         <context link="purchase_order" field="ordering_agency"/>
7185                                         <context link="picklist" field="org_unit"/>
7186                                 </retrieve>
7187                         </actions>
7188                 </permacrud>
7189         </class>
7190
7191         <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">
7192                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7193                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7194                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7195                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7196                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7197                 </fields>
7198                 <links>
7199                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7200                 </links>
7201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7202                         <actions>
7203                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7204                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7205                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7206                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7207                         </actions>
7208                 </permacrud>
7209         </class>
7210
7211         <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">
7212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7213                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7214                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7215                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7216                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7217                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7218                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7219                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7220                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7221                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7222                 </fields>
7223                 <links>
7224                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7225                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7226                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7227                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7228                 </links>
7229         </class>
7230
7231         <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">
7232                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7233                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7234                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7235                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7236                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7237                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7238                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7239                 </fields>
7240                 <links>
7241                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7242                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7243                 </links>
7244         </class>
7245
7246         <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">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7248                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7249                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7250                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7251                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7252                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7253                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7254                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7255                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7256                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7257                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7258                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7259                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7260                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7261                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7262                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7263                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7264                 </fields>
7265                 <links>
7266                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7267                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7268                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7269                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7270                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7271                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7272                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7273                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7274                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7275                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7276                 </links>
7277         </class>
7278
7279         <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">
7280                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7281                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7282                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7284                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7285                 </fields>
7286                 <links/>
7287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7288                         <actions>
7289                                 <retrieve />
7290                         </actions>
7291                 </permacrud>
7292         </class>
7293
7294         <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">
7295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7296                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7297                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7298                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7299                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7300                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7301             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7302                 </fields>
7303                 <links/>
7304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7305             <actions>
7306                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7307                 <retrieve />
7308                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7309                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7310             </actions>
7311         </permacrud>
7312         </class>
7313
7314         <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">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7316                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7317                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7318                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7319                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7320                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7321                 </fields>
7322                 <links/>
7323         </class>
7324         <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">
7325                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7326                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7327                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7328                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7329                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7330                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7331                 </fields>
7332                 <links>
7333                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7334                 </links>
7335         </class>
7336
7337         <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">
7338             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7339                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7340                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7341                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7342                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7343                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7344                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7345         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7346
7347             </fields>
7348             <links>
7349                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7350             </links>
7351             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7352                 <actions>
7353                     <create permission="ADMIN_PROVIDER">
7354                         <context link="provider" field="owner"/>
7355                     </create>
7356                     <retrieve permission="ADMIN_PROVIDER">
7357                         <context link="provider" field="owner"/>
7358                     </retrieve>
7359                     <update permission="ADMIN_PROVIDER">
7360                         <context link="provider" field="owner"/>
7361                     </update>
7362                     <delete permission="ADMIN_PROVIDER">
7363                         <context link="provider" field="owner"/>
7364                     </delete>
7365                 </actions>
7366             </permacrud>
7367         </class>
7368         
7369         <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">
7370             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7371                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7372                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7373                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7374                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7375             </fields>
7376             <links>
7377                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7378             </links>
7379             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7380                 <actions>
7381                     <create permission="ADMIN_PROVIDER">
7382                         <context link="provider" field="owner"/>
7383                     </create>
7384                     <retrieve permission="ADMIN_PROVIDER">
7385                         <context link="provider" field="owner"/>
7386                     </retrieve>
7387                     <update permission="ADMIN_PROVIDER">
7388                         <context link="provider" field="owner"/>
7389                     </update>
7390                     <delete permission="ADMIN_PROVIDER">
7391                         <context link="provider" field="owner"/>
7392                     </delete>
7393                 </actions>
7394             </permacrud>
7395         </class>
7396         
7397         <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">
7398             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7399                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7400                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7401                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7402                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7403                 </fields>
7404                 <links/>
7405         </class>
7406
7407         <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">
7408                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7409                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7410                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7411                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7412                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7413                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7414                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7415                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7416                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7417                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7418                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7419                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7420                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7421                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7422                 </fields>
7423                 <links>
7424                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7425                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
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="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
7446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7447                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7448                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7449                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7450                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7451                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7452                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7453                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7454                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7455                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7456                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7457                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7458                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7459                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7460                 </fields>
7461                 <links>
7462                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7463                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7464                 </links>
7465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7466             <actions>
7467                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7468                     <context link="account" jump="provider" field="owner"/>
7469                 </retrieve>
7470                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7471                     <context link="account" jump="provider" field="owner"/>
7472                 </update>
7473                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7474                     <context link="account" jump="provider" field="owner"/>
7475                 </delete>
7476             </actions>
7477         </permacrud>
7478         </class>
7479
7480
7481         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7482                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7483                         <field name="id" reporter:datatype="id" />
7484                         <field name="parent" reporter:datatype="link"/>
7485                         <field name="owner" reporter:datatype="link"/>
7486                         <field name="create_time" reporter:datatype="timestamp"/>
7487                         <field name="name" reporter:datatype="text"/>
7488                         <field name="shared" reporter:datatype="bool"/>
7489                         <field name="share_with" reporter:datatype="link"/>
7490                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7491                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7492                 </fields>
7493                 <links>
7494                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7495                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7496                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7497                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7498                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7499                 </links>
7500         </class>
7501         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7502                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7503                         <field name="id" reporter:datatype="id" />
7504                         <field name="parent" reporter:datatype="link"/>
7505                         <field name="owner" reporter:datatype="link"/>
7506                         <field name="create_time" reporter:datatype="timestamp"/>
7507                         <field name="name" reporter:datatype="text"/>
7508                         <field name="shared" reporter:datatype="bool"/>
7509                         <field name="share_with" reporter:datatype="link"/>
7510                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7511                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7512                 </fields>
7513                 <links>
7514                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7515                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7516                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7517                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7518                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7519                 </links>
7520         </class>
7521         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7522                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7523                         <field name="id" reporter:datatype="id" />
7524                         <field name="parent" reporter:datatype="link"/>
7525                         <field name="owner" reporter:datatype="link"/>
7526                         <field name="create_time" reporter:datatype="timestamp"/>
7527                         <field name="name" reporter:datatype="text"/>
7528                         <field name="shared" reporter:datatype="bool"/>
7529                         <field name="share_with" reporter:datatype="link"/>
7530                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7531                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7532                 </fields>
7533                 <links>
7534                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7535                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7536                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7537                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7538                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7539                 </links>
7540         </class>
7541         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7542                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7543                         <field name="id" reporter:datatype="id" />
7544                         <field name="owner" reporter:datatype="link"/>
7545                         <field name="create_time" reporter:datatype="timestamp"/>
7546                         <field name="name" reporter:datatype="text"/>
7547                         <field name="data" reporter:datatype="text"/>
7548                         <field name="folder" reporter:datatype="link"/>
7549                         <field name="description" reporter:datatype="text"/>
7550                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7551                 </fields>
7552                 <links>
7553                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7554                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7555                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7556                 </links>
7557         </class>
7558         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7559                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7560                         <field name="id" reporter:datatype="id" />
7561                         <field name="owner" reporter:datatype="link"/>
7562                         <field name="create_time" reporter:datatype="timestamp"/>
7563                         <field name="template" reporter:datatype="link"/>
7564                         <field name="data" reporter:datatype="text"/>
7565                         <field name="folder" reporter:datatype="link"/>
7566                         <field name="recur" reporter:datatype="bool"/>
7567                         <field name="recurrence" reporter:datatype="interval"/>
7568                         <field name="name" reporter:datatype="text"/>
7569                         <field name="description" reporter:datatype="text"/>
7570                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7571                 </fields>
7572                 <links>
7573                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7574                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7575                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7576                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7577                 </links>
7578         </class>
7579         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7580                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7581                         <field name="id" reporter:datatype="id" />
7582                         <field name="runner" reporter:datatype="link"/>
7583                         <field name="start_time" reporter:datatype="timestamp"/>
7584                         <field name="complete_time" reporter:datatype="timestamp"/>
7585                         <field name="run_time" reporter:datatype="timestamp"/>
7586                         <field name="email" reporter:datatype="text"/>
7587                         <field name="excel_format" reporter:datatype="bool"/>
7588                         <field name="csv_format" reporter:datatype="bool"/>
7589                         <field name="html_format" reporter:datatype="bool"/>
7590                         <field name="error_code" reporter:datatype="int"/>
7591                         <field name="error_text" reporter:datatype="text"/>
7592                         <field name="report" reporter:datatype="link"/>
7593                         <field name="folder" reporter:datatype="link"/>
7594                         <field name="chart_pie" reporter:datatype="bool"/>
7595                         <field name="chart_bar" reporter:datatype="bool"/>
7596                         <field name="chart_line" reporter:datatype="bool"/>
7597                 </fields>
7598                 <links>
7599                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7600                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7601                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7602                 </links>
7603         </class>
7604         <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">
7605                 <fields oils_persist:primary="id">
7606                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7607                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7608                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7609                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7610                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7611                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7612                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7613                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7614                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7615                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7616                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7617                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7618                 </fields>
7619                 <links>
7620                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7621                 </links>
7622         </class>
7623         <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">
7624                 <fields oils_persist:primary="id">
7625                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7626                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7627                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7628                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7629                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7630                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7631                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7632                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7633                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7634                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7635                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7636                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7637                 </fields>
7638                 <links>
7639                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7640                 </links>
7641         </class>
7642         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7643                 <fields oils_persist:primary="id">
7644                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7645                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7646                         <field reporter:label="Fingerprint" name="fingerprint" />
7647                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7648                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7649                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7650                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7651                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7652                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7653                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7654                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7655                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7656                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7657                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7658                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7659                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7660                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7661                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7662                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7663                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7664                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7665                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7666                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7667                 </fields>
7668                 <links>
7669                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7670                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7671                 </links>
7672         </class>
7673         <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">
7674                 <fields oils_persist:primary="id">
7675                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7676                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7677                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7678                 </fields>
7679                 <links>
7680                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7681                 </links>
7682         </class>
7683         <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">
7684                 <fields oils_persist:primary="id">
7685                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7686                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7687                 </fields>
7688                 <links>
7689                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7690                 </links>
7691         </class>
7692         <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">
7693                 <fields oils_persist:primary="id">
7694                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7695                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7696                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7697                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7698                 </fields>
7699                 <links>
7700                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7701                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7702                 </links>
7703         </class>
7704         <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">
7705                 <fields oils_persist:primary="xact">
7706                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7707                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7708                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7709                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7710                 </fields>
7711                 <links>
7712                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7713                 </links>
7714         </class>
7715         <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">
7716                 <fields oils_persist:primary="xact">
7717                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7718                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7719                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7720                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7721                 </fields>
7722                 <links>
7723                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7724                 </links>
7725         </class>
7726         <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)">
7727                 <fields oils_persist:primary="id">
7728                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7729                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7730                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7731                 </fields>
7732                 <links>
7733                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7734                 </links>
7735         </class>
7736         <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">
7737                 <fields oils_persist:primary="id">
7738                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7739                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7740                 </fields>
7741                 <links>
7742                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7743                 </links>
7744         </class>
7745         <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">
7746                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7747                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7748                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7749                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7750                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7751                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7752                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7753                 </fields>
7754                 <links>
7755                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7756                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7757                 </links>
7758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7759                         <actions>
7760                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7761                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7762                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7763                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7764                         </actions>
7765                 </permacrud>
7766         </class>
7767         <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">
7768                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7769                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7770                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7771                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7772                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7773                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7774                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7775                 </fields>
7776                 <links>
7777                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7778                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7779                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7780                 </links>
7781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7782                         <actions>
7783                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7784                                         <context link="formula" field="owner"/>
7785                                 </create>
7786                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7787                                         <context link="formula" field="owner"/>
7788                                 </retrieve>
7789                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7790                                         <context link="formula" field="owner"/>
7791                                 </update>
7792                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7793                                         <context link="formula" field="owner"/>
7794                                 </delete>
7795                         </actions>
7796                 </permacrud>
7797         </class>
7798
7799         <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">
7800                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7801                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7802                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7803                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7804                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7805                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7806                 </fields>
7807                 <links>
7808                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7809                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7810                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7811                 </links>
7812                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7813                         <actions>
7814                                 <create permission="CREATE_PURCHASE_ORDER">
7815                                         <context link="formula" field="owner"/>
7816                 </create>
7817                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7818                                         <context link="formula" field="owner"/>
7819                 </retrieve>
7820                                 <update permission="CREATE_PURCHASE_ORDER">
7821                                         <context link="formula" field="owner"/>
7822                 </update>
7823                                 <delete permission="CREATE_PURCHASE_ORDER">
7824                                         <context link="formula" field="owner"/>
7825                 </delete>
7826                         </actions>
7827                 </permacrud>
7828         </class>
7829
7830         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7831                 <fields oils_persist:primary="id">
7832                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7833                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7834                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7835                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7836                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7837                 </fields>
7838                 <links>
7839                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7840                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7841                 </links>
7842         </class>
7843
7844         <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">
7845                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7846                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7847                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7848                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7849                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7850                 </fields>
7851                 <links>
7852                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7853                 </links>
7854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7855                         <actions>
7856                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7857                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7858                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7859                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7860                         </actions>
7861                 </permacrud>
7862         </class>
7863
7864         <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">
7865                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7866                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7867                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7868                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7869                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7870                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7871                 </fields>
7872                 <links>
7873                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7874                 </links>
7875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7876                         <actions>
7877                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7878                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7879                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7880                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7881                         </actions>
7882                 </permacrud>
7883         </class>
7884
7885         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7886                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7887                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7888                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7889                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7890                 </fields>
7891                 <links>
7892                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7893                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7894                 </links>
7895         </class>
7896
7897         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7898                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7899                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7900                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7901                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7902                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7903                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7904                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7905                 </fields>
7906                 <links>
7907                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7908                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7909                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7910                 </links>
7911         </class>
7912
7913         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7914                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7915                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7916                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7917                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7918                 </fields>
7919                 <links>
7920                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7921                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7922                 </links>
7923         </class>
7924
7925         <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">
7926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7927                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7928                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7929                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7930                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7931                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7932                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7933                 </fields>
7934                 <links>
7935                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7936                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7937                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7938                 </links>
7939         </class>
7940
7941         <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">
7942                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7943                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7944                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7945                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7946                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7947                 </fields>
7948                 <links>
7949                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7950                 </links>
7951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7952             <actions>
7953                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7954                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7955                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7956                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7957             </actions>
7958                 </permacrud>
7959         </class>
7960
7961         <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">
7962                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7963                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7964                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7965                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7966                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7967                 </fields>
7968                 <links>
7969                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7970                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7971                 </links>
7972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7973                         <actions>
7974                                 <create permission="ADMIN_CLAIM_POLICY">
7975                                         <context link="claim_policy" field="org_unit"/>
7976                 </create>
7977                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7978                                         <context link="claim_policy" field="org_unit"/>
7979                 </retrieve>
7980                                 <update permission="ADMIN_CLAIM_POLICY">
7981                                         <context link="claim_policy" field="org_unit"/>
7982                 </update>
7983                                 <delete permission="ADMIN_CLAIM_POLICY">
7984                                         <context link="claim_policy" field="org_unit"/>
7985                 </delete>
7986                         </actions>
7987                 </permacrud>
7988         </class>
7989
7990     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7991         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7992             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7993             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7994             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7995             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7996             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7997             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7998             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7999             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8000             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8001             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8002             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8003             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8004             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8005             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8006             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8007         </fields>
8008     </class>
8009
8010     <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">
8011         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8012             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8013             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8014             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8015             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8016             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8017         </fields>
8018     </class>
8019
8020     <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">
8021         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8022             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8023             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8024             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8025             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8026             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8027             <field reporter:label="City" name="city" reporter:datatype="text"/>
8028             <field reporter:label="State" name="state" reporter:datatype="text"/>
8029             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8030             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8031             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8032         </fields>
8033     </class>
8034
8035     <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">
8036         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8037             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8038             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8039             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8040             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8041             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8042             <field reporter:label="City" name="city" reporter:datatype="text"/>
8043             <field reporter:label="State" name="state" reporter:datatype="text"/>
8044             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8045             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8046             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8047         </fields>
8048     </class>
8049
8050     <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">
8051         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8052             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8053             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8054             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8055             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8056             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8057             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8058         </fields>
8059     </class>
8060
8061         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8062                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8063                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8064                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8065                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8066                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8067                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8068                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8069                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8070                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8071                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8072                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8073                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8074                 </fields>
8075                 <links>
8076                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8077                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8078                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8079                 </links>
8080         </class>
8081
8082         <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">
8083                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8084                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8085                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8086                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8087                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8088                 </fields>
8089                 <links>
8090                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8091                 </links>
8092         </class>
8093
8094     <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">
8095         <fields>
8096             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8097             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8098             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8099         </fields>
8100                 <links>
8101                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8102                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8103                 </links>
8104     </class>
8105
8106     <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">
8107         <fields>
8108             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8109             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8110         </fields>
8111                 <links>
8112                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8113                 </links>
8114     </class>
8115
8116     <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">
8117         <fields>
8118             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8119             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8120             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8121         </fields>
8122                 <links>
8123                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8124                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8125                 </links>
8126     </class>
8127
8128     <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">
8129         <fields>
8130             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8131             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8132         </fields>
8133                 <links>
8134                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8135                 </links>
8136     </class>
8137
8138     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8139                 <oils_persist:source_definition>
8140
8141             SELECT  DISTINCT l.*
8142               FROM  action.unfulfilled_hold_loops l
8143                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8144               WHERE l.count = m.max
8145
8146                 </oils_persist:source_definition>
8147         <fields>
8148             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8149             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8150             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8151         </fields>
8152                 <links>
8153                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8154                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8155                 </links>
8156     </class>
8157
8158         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8159                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8160                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8161                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8162                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8163                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8164                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8165                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8166                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8167                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8168                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8169                 </fields>
8170                 <links>
8171                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8172                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8173                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8174                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8175                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8176                 </links>
8177         </class>
8178
8179         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8180                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8181                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8182                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8183                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8184                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8185                 </fields>
8186                 <links>
8187                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8188                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8189                 </links>
8190         </class>
8191
8192         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8193                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8194                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8195                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8196                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8197                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8198                 </fields>
8199                 <links>
8200                 </links>
8201         </class>
8202
8203         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8204                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8205                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8206                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8207                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8208                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8209                 </fields>
8210                 <links>
8211                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8212                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8213                 </links>
8214         </class>
8215         
8216         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8217                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8218                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8219                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8220                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8221                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8222                 </fields>
8223                 <links>
8224                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8225                 </links>
8226         </class>
8227         
8228         <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">
8229                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8230                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8231                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8232                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8233                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8234                 </fields>
8235                 <links>
8236                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8237                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8238                 </links>
8239         </class>
8240
8241         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8242                 <fields oils_persist:primary="name">
8243                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8244                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8245                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8246                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8247                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8248                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8249                 </fields>
8250                 <links>
8251                 </links>
8252         </class>
8253
8254         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8255                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8256                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8257                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8258                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8259                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8260                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8261                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8262                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8263                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8264                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8265                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8266                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8267                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8268                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8269                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8270                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8271                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8272                 </fields>
8273                 <links>
8274                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8275                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8276                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8277                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8278                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8279                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8280                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8281                 </links>
8282         </class>
8283
8284         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8285                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8286                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8287                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8288                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8289                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8290                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8291                 </fields>
8292                 <links>
8293                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8294                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8295                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8296                 </links>
8297         </class>
8298
8299         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8300                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8301                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8302                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8303                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8304                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8305                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8306                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8307                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8308                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8309                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8310                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8311                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8312                 </fields>
8313                 <links>
8314                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8315                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8316                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8317                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8318                 </links>
8319         </class>
8320
8321         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8322                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8323                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8324                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8325                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8326                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8327                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8328                 </fields>
8329                 <links>
8330                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8331                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8332                 </links>
8333         </class>
8334
8335         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8336                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8337                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8338                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8339                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8340                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8341                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8342                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8343                 </fields>
8344                 <links>
8345                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8346                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8347                 </links>
8348         </class>
8349
8350         <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">
8351                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8352                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8353                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8354                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8355                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8356                 </fields>
8357                 <links>
8358                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8359                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8360                 </links>
8361         </class>
8362
8363         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8364                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8365                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8366                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8367                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8368                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8369                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8370                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8371                 </fields>
8372                 <links>
8373                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8374                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8375                 </links>
8376         </class>
8377
8378         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8379                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8380                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8381                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8382                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8383                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8384                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8385                 </fields>
8386                 <links>
8387                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8388                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8389                 </links>
8390         </class>
8391
8392         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8393                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8394                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8395                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8396                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8397                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8398                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8399                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8400                 </fields>
8401                 <links>
8402                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8403                 </links>
8404         </class>
8405
8406         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8408                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8409                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8410                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8411                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8412                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8413                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8414                 </fields>
8415                 <links>
8416                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8417                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8418                 </links>
8419         </class>
8420
8421         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8422                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8423                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8424                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8425                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8426                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8427                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8428                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8429                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8430                 </fields>
8431                 <links>
8432                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8433                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8434                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8435                 </links>
8436         </class>
8437
8438         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8439                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8440                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8441                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8442                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8443                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8444                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8445                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8446                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8447                 </fields>
8448                 <links>
8449                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8450                 </links>
8451         </class>
8452
8453         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8454                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8455                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8456                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8457                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8458                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8459                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8460                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8461                 </fields>
8462                 <links>
8463                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8464                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8465                 </links>
8466         </class>
8467
8468         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8469                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8470                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8471                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8472                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8473                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8474                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8475                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8476                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8477                 </fields>
8478                 <links>
8479                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8480                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8481                 </links>
8482         </class>
8483
8484         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8486                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8487                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8488                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8489                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8490                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8491                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8492                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8493                 </fields>
8494                 <links>
8495                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8496                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8497                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8498                 </links>
8499         </class>
8500
8501         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL 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="Left Operand" name="left_operand" 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="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8513                 </links>
8514         </class>
8515
8516         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null 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="Negate?" name="negate" reporter:datatype="bool"/>
8523                 </fields>
8524                 <links>
8525                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8526                 </links>
8527         </class>
8528
8529         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8530                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8531                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8532                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8533                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8534                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8535                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8536                 </fields>
8537                 <links>
8538                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8539                 </links>
8540         </class>
8541
8542         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8543                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8544                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8545                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8546                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8547                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8548                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8549                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8550                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8551                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8552                 </fields>
8553                 <links>
8554                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8555                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8556                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8557                 </links>
8558         </class>
8559
8560         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8561                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8562                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8563                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8564                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8565                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8566                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8567                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8568                 </fields>
8569                 <links>
8570                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8571                 </links>
8572         </class>
8573
8574         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8575                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8576                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8577                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8578                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8579                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8580                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8581                 </fields>
8582                 <links>
8583                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8584                 </links>
8585         </class>
8586
8587         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8588                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8589                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8590                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8591                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8592                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8593                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8594                 </fields>
8595                 <links>
8596                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8597                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8598                 </links>
8599         </class>
8600
8601         <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">
8602                 <fields oils_persist:primary="id">
8603                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8604                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8605                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8606                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8607                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8608                 </fields>
8609                 <links>
8610                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8611                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8612                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8613                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8614                 </links>
8615         </class>
8616
8617         <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">
8618                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8619                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8620                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8621                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8622                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8623                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8624                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8625                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8626                 </fields>
8627                 <links/>
8628                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8629                         <actions>
8630                                 <retrieve/>
8631                         </actions>
8632                 </permacrud>
8633         </class>
8634
8635         <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">
8636                 <fields oils_persist:primary="ptype_key">
8637                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8638                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8639                 </fields>
8640                 <links/>
8641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8642                         <actions>
8643                                 <retrieve/>
8644                         </actions>
8645                 </permacrud>
8646         </class>
8647
8648         <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">
8649                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8650                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8651                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8652                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8653                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8654                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8655                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8656                 </fields>
8657                 <links>
8658                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8659                 </links>
8660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8661                         <actions>
8662                                 <retrieve/>
8663                         </actions>
8664                 </permacrud>
8665         </class>
8666
8667         <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">
8668                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8669                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8670                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8671                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8672                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8673                 </fields>
8674                 <links>
8675                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8676                 </links>
8677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8678                         <actions>
8679                                 <retrieve/>
8680                         </actions>
8681                 </permacrud>
8682         </class>
8683
8684         <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">
8685                 <fields oils_persist:primary="code">
8686                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8687                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8688                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8689                 </fields>
8690                 <links/>
8691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8692                         <actions>
8693                                 <retrieve/>
8694                         </actions>
8695                 </permacrud>
8696         </class>
8697
8698         <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">
8699                 <oils_persist:source_definition>
8700
8701             SELECT  b.id,
8702                     MAX(dcp.edit_date) AS last_delete_date
8703              FROM   biblio.record_entry b
8704                     JOIN asset.call_number cn ON (cn.record = b.id)
8705                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8706              WHERE  NOT b.deleted
8707              GROUP BY b.id
8708              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8709
8710                 </oils_persist:source_definition>
8711                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8712                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8713                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8714                 </fields>
8715                 <links>
8716                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8717                 </links>
8718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8719                         <actions>
8720                                 <retrieve/>
8721                         </actions>
8722                 </permacrud>
8723         </class>
8724
8725         <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">
8726                 <oils_persist:source_definition>
8727
8728             -- -- 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.
8729             -- -- 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
8730             -- -- may not.
8731             -- SELECT
8732             --     bre.id AS "bib_id",
8733             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8734             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8735             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8736             -- FROM (
8737                 SELECT
8738                     y.bre AS "id",
8739                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8740                     y.hold_count AS "hold_count",
8741                     (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"
8742                 FROM (
8743                         SELECT
8744                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8745                             COUNT(*) AS "hold_count"
8746                         FROM action.hold_request h
8747                         WHERE
8748                             cancel_time IS NULL
8749                             AND fulfillment_time IS NULL
8750                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8751                         GROUP BY 1
8752                     )y LEFT JOIN (
8753                         SELECT 
8754                             (SELECT id
8755                                 FROM biblio.record_entry 
8756                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8757                             ) AS "bre", 
8758                             COUNT(*) AS "copy_count"
8759                         FROM asset.copy
8760                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8761                         WHERE copy.holdable 
8762                             AND NOT copy.deleted 
8763                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8764                         GROUP BY 1
8765                     )x ON x.bre = y.bre
8766                 -- )z RIGHT JOIN (
8767                 --     SELECT id
8768                 --     FROM biblio.record_entry
8769                 --     WHERE NOT deleted
8770                 -- )bre ON (z.bib_id = bre.id)
8771                 
8772
8773                 </oils_persist:source_definition>
8774                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8775                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8776                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8777                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8778                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8779                 </fields>
8780                 <links>
8781                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8782                 </links>
8783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8784                         <actions>
8785                                 <retrieve/>
8786                         </actions>
8787                 </permacrud>
8788         </class>
8789
8790         <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">
8791                 <oils_persist:source_definition>
8792             SELECT *,
8793                 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,
8794                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
8795             FROM
8796                 (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
8797                     FROM
8798                         action.hold_request ahr
8799                         JOIN reporter.hold_request_record rhrr USING (id)
8800                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8801                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
8802                     WHERE
8803                         ahr.cancel_time IS NULL
8804                         AND ahr.fulfillment_time IS NULL
8805                     GROUP BY bib_record, pickup_lib
8806                 )x
8807                 JOIN
8808                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
8809                     FROM
8810                         action.hold_request ahr
8811                         JOIN reporter.hold_request_record rhrr USING (id)
8812                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8813                     WHERE
8814                         ahr.cancel_time IS NULL
8815                         AND ahr.fulfillment_time IS NULL
8816                     GROUP BY bib_record
8817                 )y
8818                 USING (id)
8819                 </oils_persist:source_definition>
8820                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8821                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
8822                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
8823                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
8824                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
8825                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
8826                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
8827                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
8828                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
8829                 </fields>
8830                 <links>
8831                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8832                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8833                 </links>
8834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8835                         <actions>
8836                                 <retrieve/>
8837                         </actions>
8838                 </permacrud>
8839         </class>
8840
8841         <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">
8842                 <oils_persist:source_definition>
8843             SELECT
8844                 ac.id,
8845                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
8846                 MAX(actac.xact_start) AS last_circ
8847             FROM asset.copy ac
8848                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8849             GROUP BY ac.id
8850
8851             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
8852             --SELECT
8853             --    ac.id,
8854             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
8855             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
8856             --FROM asset.copy ac
8857             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8858             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
8859             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
8860                 </oils_persist:source_definition>
8861                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8862                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
8863                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
8864                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
8865                 </fields>
8866                 <links>
8867                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8868                 </links>
8869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8870                         <actions>
8871                                 <retrieve/>
8872                         </actions>
8873                 </permacrud>
8874         </class>
8875
8876         <!-- ********************************************************************************************************************* -->
8877         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8878         <!-- ********************************************************************************************************************* -->
8879         <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">
8880                 <fields oils_persist:primary="id">
8881                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8882                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8883                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8884                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8885                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8886                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8887                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8888                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8889                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8890                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8891                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8892                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8893                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8894                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8895                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8896                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8897                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8898                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8899                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8900                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8901                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8902                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8903                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8904                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8905                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8906                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8907                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8908                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8909                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8910                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8911                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8912                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8913                 </fields>
8914                 <links>
8915                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8916                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8917                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8918                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8919                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8920                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8921                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8922                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8923                 </links>
8924         </class>
8925
8926         <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">
8927                 <fields oils_persist:primary="id">
8928                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8929                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8930                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8931                 </fields>
8932                 <links>
8933                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8934                 </links>
8935         </class>
8936
8937         <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">
8938                 <fields oils_persist:primary="id">
8939                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8940                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8941                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8942                 </fields>
8943                 <links>
8944                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8945                 </links>
8946         </class>
8947
8948         <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">
8949                 <fields oils_persist:primary="id">
8950                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8951
8952                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8953                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8954                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8955
8956                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8957                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8958                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8959
8960                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8961                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8962
8963                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8964                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8965                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8966
8967                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8968                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8969
8970                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8971                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8972                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8973
8974                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8975                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8976                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8977
8978                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8979                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8980                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8981                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8982
8983                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8984                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8985
8986                 </fields>
8987                 <links>
8988                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8989                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8990                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8991                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8992                 </links>
8993         </class>
8994
8995         <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">
8996                 <oils_persist:source_definition>
8997
8998             SELECT
8999                 po.ordering_agency AS ordering_agency,
9000                 po.id AS purchase_order,
9001                 li.id AS lineitem,
9002                 lid.id AS lineitem_detail,
9003                 cpa.id AS claim_policy_action
9004             FROM
9005                 acq.lineitem_detail lid
9006                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9007                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9008                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9009                 JOIN acq.claim_policy_action cpa ON (
9010                     cpa.claim_policy = cp.id
9011
9012                     -- we only care about claim policy actions whose claim
9013                     -- interval we'd reached or exceeded
9014                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9015
9016                     -- filter out all claim policy actions where claim events
9017                     -- have occurred on or after the action's action_interval
9018                     AND NOT EXISTS (
9019                         SELECT 1
9020                         FROM
9021                             acq.claim_event evt
9022                             JOIN acq.claim claim ON (
9023                                 claim.id = evt.claim
9024                                 AND claim.lineitem_detail = lid.id
9025                             )
9026                         WHERE
9027                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9028                     )
9029                 )
9030             WHERE
9031                 lid.cancel_reason IS NULL
9032                 AND li.cancel_reason IS NULL -- belt/suspenders
9033                 AND po.cancel_reason IS NULL -- belt/suspenders
9034                 AND lid.recv_time IS NULL
9035                 AND po.state = 'on-order'
9036             ORDER BY 1, 2, 3, 4, 5
9037
9038                 </oils_persist:source_definition>
9039                 <fields>
9040                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9041                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9042                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9043                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9044                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9045                 </fields>
9046                 <links>
9047                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9048                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9049                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9050                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9051                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9052                 </links>
9053         </class>
9054
9055         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9056                 <oils_persist:source_definition>
9057
9058             SELECT 
9059                 li.id AS lineitem, 
9060                 (
9061                     SELECT COUNT(lid.id) 
9062                     FROM acq.lineitem_detail lid
9063                     WHERE lineitem = li.id
9064                 ) AS item_count,
9065                 (
9066                     SELECT COUNT(lid.id) 
9067                     FROM acq.lineitem_detail lid
9068                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9069                 ) AS recv_count,
9070                 (
9071                     SELECT COUNT(lid.id) 
9072                     FROM acq.lineitem_detail lid
9073                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9074                 ) AS cancel_count,
9075                 (
9076                     SELECT COUNT(lid.id) 
9077                     FROM acq.lineitem_detail lid
9078                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9079                     WHERE NOT debit.encumbrance AND lineitem = li.id
9080                 ) AS invoice_count,
9081                 (
9082                     SELECT COUNT(DISTINCT(lid.id)) 
9083                     FROM acq.lineitem_detail lid
9084                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9085                     WHERE lineitem = li.id
9086                 ) AS claim_count,
9087                 (
9088                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9089                     FROM acq.lineitem_detail lid
9090                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9091                 ) AS estimated_amount,
9092                 (
9093                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9094                     FROM acq.lineitem_detail lid
9095                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9096                     WHERE debit.encumbrance AND lineitem = li.id
9097                 ) AS encumbrance_amount,
9098                 (
9099                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9100                     FROM acq.lineitem_detail lid
9101                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9102                     WHERE NOT debit.encumbrance AND lineitem = li.id
9103                 ) AS paid_amount
9104
9105                 FROM acq.lineitem AS li
9106         </oils_persist:source_definition>
9107                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9108                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9109                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9110                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9111                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9112                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9113                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9114                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9115                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9116                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9117                 </fields>
9118                 <links>
9119                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9120                 </links>
9121     </class>
9122
9123
9124         <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">
9125                 <oils_persist:source_definition>
9126
9127                         SELECT  t.*
9128                           FROM  action.transit_copy t
9129                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9130                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9131                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9132
9133                 </oils_persist:source_definition>
9134                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9135                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9136                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9137                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9138                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9139                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9140                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9141                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9142                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9143                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9144                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9145                 </fields>
9146                 <links>
9147                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9148                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9149                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9150                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9151                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9152                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9153                 </links>
9154         </class>
9155
9156     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9157                 <oils_persist:source_definition>
9158
9159         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9160                 SELECT
9161                         cp.id as copy,
9162                         COUNT(circ.id),
9163                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9164                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9165                 FROM
9166                         asset.copy cp
9167                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9168                 GROUP BY 1, 3, 4
9169                 UNION
9170                 SELECT
9171                         cp.id as copy,
9172                         COUNT(circ.id),
9173                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9174                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9175                 FROM
9176                         asset.copy cp
9177                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9178                 GROUP BY 1, 3, 4
9179                 UNION
9180                 SELECT
9181                         id as copy,
9182                         circ_count,
9183                         -1 AS year,
9184                         false as is_renewal
9185                 FROM
9186                         extend_reporter.legacy_circ_count
9187         )x GROUP BY 1, 3, 4
9188
9189                 </oils_persist:source_definition>
9190         <fields>
9191             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9192             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9193             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9194             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9195         </fields>
9196                 <links>
9197                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9198                 </links>
9199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9200                         <actions>
9201                                 <retrieve/>
9202                         </actions>
9203                 </permacrud>
9204     </class>
9205
9206         <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">
9207                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9208                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9209                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9210                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9211                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9212                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9213                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9214                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9215                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9216                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9217                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9218                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9219                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9220                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9221                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9222                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9223                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9224                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9225                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9226                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9227                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9228                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9229                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9230                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9231                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9232                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9233                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9234                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9235                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9236                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9237                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9238                 </fields>
9239                 <links>
9240                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9241                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9242                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9243                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9244                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9245                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9246                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9247                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9248                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9249                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9250                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9251                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9252                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9253                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9254                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9255                 </links>
9256         </class>
9257
9258     <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">
9259         <fields oils_persist:primary="id">
9260             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9261             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9262             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9263             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9264             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9265             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9266             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9267             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9268             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9269             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9270             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9271             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9272             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9273             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9274             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9275             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9276             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9277             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9278             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9279             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9280             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9281             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9282             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9283             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9284             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9285             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9286             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9287             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9288             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9289             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9290             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9291             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9292             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9293             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9294         </fields>
9295         <links>
9296             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9297             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9298             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9299             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9300             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9301         </links>
9302     </class>
9303
9304     <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">
9305         <fields oils_persist:primary="id">
9306             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9307             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9308             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9309             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9310         </fields>
9311         <links>
9312             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9313             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9314         </links>
9315     </class>
9316
9317     <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">
9318         <fields oils_persist:primary="owning_lib">
9319             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9320             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9321             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9322         </fields>
9323         <links>
9324             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9325         </links>
9326     </class>
9327
9328     <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">
9329         <fields oils_persist:primary="id">
9330             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9331             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9332             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9333             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9334             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9335         </fields>
9336         <links>
9337             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9338             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9339             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9340         </links>
9341     </class>
9342
9343     <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">
9344         <fields oils_persist:primary="circ_lib">
9345             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9346             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9347             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9348             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9349         </fields>
9350         <links>
9351             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9352             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9353         </links>
9354     </class>
9355
9356     <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">
9357         <fields oils_persist:primary="id">
9358             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9359             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9360             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9361             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9362             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9363         </fields>
9364         <links>
9365             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9366             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9367             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9368         </links>
9369     </class>
9370
9371     <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">
9372         <fields oils_persist:primary="home_ou">
9373             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9374             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9375             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9376             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9377         </fields>
9378         <links>
9379             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9380             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9381         </links>
9382     </class>
9383         <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">
9384                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9385                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9386                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9387                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9388                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9389                 </fields>
9390                 <links>
9391                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9392                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9393                 </links>
9394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9395                         <actions>
9396                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9397                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9398                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9399                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9400                         </actions>
9401                 </permacrud>
9402         </class>
9403         <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">
9404                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9405                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9406                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9407                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9408                 </fields>
9409                 <links>
9410                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9411                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9412                         </links>
9413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9414                 <actions>
9415                                 <create permission="ADMIN_ACQ_FUND_TAG">
9416                                         <context link="tag" field="owner"/>
9417                                 </create>
9418                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9419                                         <context link="tag" field="owner"/>
9420                                 </retrieve>
9421                                 <update permission="ADMIN_ACQ_FUND_TAG">
9422                                         <context link="tag" field="owner"/>
9423                                 </update>
9424                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9425                                         <context link="tag" field="owner"/>
9426                                 </delete>
9427                         </actions>
9428                 </permacrud>
9429         </class>
9430         <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">
9431                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9432                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9433                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9434                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9435                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9436                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9437                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9438                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9439                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9440                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9441                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9442                 </fields>
9443                 <links>
9444                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9445                 </links>
9446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9447                         <actions>
9448                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9449                                 <retrieve/>
9450                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9451                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9452                         </actions>
9453                 </permacrud>
9454         </class>
9455
9456         <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">
9457                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9458                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9459                         <field name="date_applied" reporter:datatype="timestamp"/>
9460                         <field name="org" reporter:datatype="org_unit"/>
9461                         <field name="original_value" reporter:datatype="text"/>
9462                         <field name="new_value" reporter:datatype="text"/>
9463                         <field name="field_name" reporter:datatype="link"/>
9464                 </fields>
9465                 <links>
9466                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9467                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9468                 </links>
9469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9470                         <actions>
9471                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9472                                 <retrieve/>
9473                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9474                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9475                         </actions>
9476                 </permacrud>
9477         </class>
9478         <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">
9479                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9480                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9481                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9482                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9483                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9484                 </fields>
9485                 <links>
9486                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9487                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9488                 </links>
9489         </class>
9490         <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">
9491                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9492                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9493                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9494                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9495                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9496                 </fields>
9497                 <links>
9498                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9499                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9500                 </links>
9501         </class>
9502
9503
9504         <!-- ********************************************************************************************************************* -->
9505
9506 </IDL>
9507
9508 <!--
9509     vim:noet:ts=4:sw=4:
9510 -->